/*
 * The guide section — hub and atlas pages.
 *
 * Loaded after article.css and adds only what the articles never had: a
 * section nav in the header, a real site-map footer, the hub's data band and
 * province directory, and the atlas page components. Nothing in article.css
 * is overridden, so the ten articles are untouched by this file.
 */

/* ── Header: the section has its own navigation ─────────────────── */
.site-bar { gap: .75rem; }
.site-nav { display: flex; align-items: center; gap: .15rem; min-width: 0; overflow-x: auto; scrollbar-width: none; margin-inline-start: auto; }
.site-nav::-webkit-scrollbar { display: none; }
.site-nav a {
  flex: 0 0 auto;
  display: inline-flex; align-items: center;
  min-height: 2.75rem; padding: 0 .8rem;
  border-radius: 999px;
  color: var(--muted); font-size: .8rem; font-weight: 740; text-decoration: none;
  transition: background .18s ease, color .18s ease;
}
.site-nav a:hover { color: var(--ink); background: rgba(235, 109, 31, .08); }
.site-nav a[aria-current="page"] { color: var(--orange-dark); background: var(--orange-soft); }
.site-bar .header-action { flex: 0 0 auto; min-height: 2.75rem; display: inline-flex; align-items: center; }
@media (max-width: 40rem) {
  .site-bar { flex-wrap: wrap; row-gap: .4rem; }
  .site-nav { order: 3; width: 100%; margin-inline-start: 0; }
  .site-nav a { min-height: 2.6rem; font-size: .78rem; }
}

/* ── Footer: the whole section, mapped ───────────────────────────── */
.site-map {
  margin-top: clamp(2rem, 5vw, 4rem);
  padding: clamp(1.6rem, 4vw, 2.75rem) clamp(1rem, 4vw, 3.5rem) clamp(1rem, 2vw, 1.5rem);
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(255, 251, 246, .7), #efe5da);
}
.site-map__inner {
  display: grid; grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: clamp(1.4rem, 3vw, 2.75rem);
  width: min(70rem, 100%); margin: 0 auto;
}
.site-map__brand { display: grid; align-content: start; gap: .7rem; }
.site-map__brand .brand { display: inline-flex; align-items: center; gap: .55rem; min-height: 2.75rem; text-decoration: none; font-weight: 820; }
.site-map__brand .brand i { width: .8rem; height: .8rem; border-radius: 70% 30% 65% 35%; background: var(--orange); transform: rotate(45deg); }
.site-map__brand p { margin: 0; max-width: 34ch; color: var(--muted); font-size: .84rem; line-height: 1.95; }
.site-map__enter {
  justify-self: start; display: inline-flex; align-items: center;
  min-height: 2.85rem; padding: .55rem 1.1rem;
  border-radius: 999px; background: var(--orange); color: #fff;
  font-size: .86rem; font-weight: 820; text-decoration: none;
  box-shadow: 0 .5rem 1.2rem rgba(196, 84, 18, .26);
}
.site-map__enter:hover { background: var(--orange-dark); }
.site-map nav { display: grid; align-content: start; gap: .05rem; }
.site-map nav h2 { margin: 0 0 .4rem; color: #4b3f39; font-size: .76rem; font-weight: 840; letter-spacing: .05em; }
.site-map nav a { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--muted); font-size: .84rem; font-weight: 620; text-decoration: none; }
.site-map nav a:hover { color: var(--orange-dark); }
.site-map__base { width: min(70rem, 100%); margin: clamp(1.2rem, 3vw, 2rem) auto 0; padding-top: 1rem; border-top: 1px solid var(--line); color: #7b6d65; font-size: .76rem; font-weight: 620; }
@media (max-width: 52rem) { .site-map__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); } .site-map__brand { grid-column: 1 / -1; } }
@media (max-width: 30rem) { .site-map__inner { gap: 1.1rem 1.3rem; } .site-map nav a { font-size: .82rem; } }

/* ── Hub ─────────────────────────────────────────────────────────── */
.hub-section { width: min(70rem, calc(100% - 2rem)); margin: 0 auto; padding: clamp(1.5rem, 4vw, 3rem) 0; }
.hub-section > h2 { margin: 0 0 .35rem; font-size: clamp(1.35rem, 3vw, 1.9rem); }
.hub-section > .lead { margin: 0 0 1.25rem; max-width: 52rem; color: var(--muted); font-size: .95rem; line-height: 1.95; }
.hub-hero .summary { max-width: 48rem; }
.hub-hero .status-badge { margin-bottom: .6rem; }
.hub-nav a { min-height: 2.6rem; display: inline-flex; align-items: center; font-size: .78rem; }

/* The data band: what the reader can page through themselves. */
.hub-tools { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); gap: .8rem; margin: 0; padding: 0; list-style: none; }
.hub-tool {
  position: relative; display: grid; gap: .3rem; align-content: start;
  min-height: 100%; padding: 1.15rem 1.2rem 1.3rem;
  border: 1px solid var(--line); border-radius: 1.2rem; background: var(--card);
  color: inherit; text-decoration: none;
  box-shadow: 0 10px 28px rgba(77, 47, 27, .05);
  transition: transform .22s ease, box-shadow .22s ease, border-color .22s ease;
}
.hub-tool:hover { transform: translateY(-3px); border-color: #e9b58f; box-shadow: var(--shadow-lift); }
.hub-tool--primary { background: var(--ink); color: #fff; border-color: transparent; }
.hub-tool small { color: var(--orange-dark); font-size: .72rem; font-weight: 800; }
.hub-tool--primary small { color: #ffad73; }
.hub-tool strong { font-size: 1.08rem; font-weight: 800; line-height: 1.55; }
.hub-tool p { margin: 0; color: var(--muted); font-size: .82rem; line-height: 1.8; }
.hub-tool--primary p { color: #e7ddd6; }
.hub-tool b { display: block; margin-top: .4rem; color: var(--orange-dark); font-size: .84rem; font-weight: 820; font-variant-numeric: tabular-nums; }
.hub-tool--primary b { color: #ffad73; }
.hub-tool::after { content: "←"; position: absolute; inset-inline-end: 1.1rem; bottom: 1rem; color: var(--orange); font-size: 1rem; font-weight: 800; transition: transform .22s ease; }
.hub-tool:hover::after { transform: translateX(-4px); }

/* The province directory: thirty-one doors into the atlas. */
.hub-provinces { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 11rem), 1fr)); gap: .5rem; margin: 0; padding: 0; list-style: none; }
.hub-provinces a {
  display: grid; align-content: center; gap: .05rem;
  min-height: 3.4rem; padding: .55rem .85rem;
  border: 1px solid var(--line); border-radius: .9rem; background: rgba(255, 253, 249, .8);
  color: var(--ink); text-decoration: none;
  transition: border-color .2s ease, background .2s ease, transform .18s ease;
}
.hub-provinces a:hover { border-color: #e9b58f; background: #fff; transform: translateY(-2px); }
.hub-provinces strong { font-size: .9rem; font-weight: 780; }
.hub-provinces small { color: var(--muted); font-size: .72rem; }

/* Articles that have no picture still deserve a card. */
.hub-card--text .hub-card__body { padding: 1.5rem; }
.hub-card--text { min-height: 12rem; }
.hub-grid { padding-bottom: 0; }

/* FAQ on the hub: the same <details> pattern the articles use. */
.hub-faq { display: grid; gap: .6rem; }
.hub-faq .faq { margin: 0; }
.hub-faq .faq p a { color: var(--orange-dark); font-weight: 740; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* ── Atlas pages ─────────────────────────────────────────────────── */
.atlas-main { width: min(70rem, calc(100% - 2rem)); margin: 0 auto; padding: 0 0 clamp(1.5rem, 4vw, 3rem); }
.atlas-hero { padding: clamp(1.25rem, 4vw, 3rem) 0 clamp(1rem, 2.5vw, 1.75rem); border-bottom: 1px solid var(--line); }
.atlas-hero h1 { font-size: clamp(1.7rem, 4.6vw, 3.2rem); }
.atlas-hero .summary { max-width: 52rem; }
.atlas-note { margin: .6rem 0 0; color: var(--muted); font-size: .84rem; line-height: 1.9; }
.atlas-note a { color: var(--orange-dark); font-weight: 720; }
.atlas-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); gap: .6rem; margin: 1.25rem 0 0; }
.atlas-facts div { padding: .7rem .9rem; border: 1px solid var(--line); border-radius: .9rem; background: var(--card); }
.atlas-facts dt { margin: 0; color: var(--muted); font-size: .72rem; font-weight: 700; }
.atlas-facts dd { margin: .1rem 0 0; color: var(--ink); font-size: 1.05rem; font-weight: 820; font-variant-numeric: tabular-nums; }
.atlas-facts dd a { color: var(--orange-dark); text-decoration: none; }
.atlas-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; margin-top: 1.25rem; }
.atlas-actions .game-button { min-height: 2.85rem; }
.atlas-link { display: inline-flex; align-items: center; min-height: 2.75rem; color: var(--orange-dark); font-size: .86rem; font-weight: 780; text-decoration: none; }
.atlas-link::after { content: "←"; margin-inline-start: .35rem; }

.atlas-section { padding: clamp(1.25rem, 3vw, 2.25rem) 0 0; }
.atlas-section > h2 { margin: 0 0 .4rem; font-size: clamp(1.25rem, 2.8vw, 1.75rem); }
.atlas-section > h3 { margin: 1.4rem 0 .4rem; font-size: 1rem; }
.atlas-figure { margin: .4rem 0 0; font-size: clamp(1.3rem, 3vw, 1.8rem); font-weight: 860; color: var(--ink); font-variant-numeric: tabular-nums; }
.atlas-pill { display: inline-block; margin-inline-start: .5rem; padding: .2rem .6rem; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark); font-size: .74rem; font-weight: 780; vertical-align: middle; }

.atlas-cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr)); gap: .5rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.atlas-cats li { display: flex; align-items: center; justify-content: space-between; gap: .6rem; min-height: 2.75rem; padding: .45rem .9rem; border: 1px solid var(--line); border-radius: .8rem; background: var(--card); color: var(--body); font-size: .86rem; }
.atlas-cats b { color: var(--orange-dark); font-size: 1rem; font-variant-numeric: tabular-nums; }

.atlas-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: .65rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.atlas-card {
  display: grid; gap: .15rem; align-content: start;
  min-height: 100%; padding: .95rem 1.05rem;
  border: 1px solid var(--line); border-radius: 1rem; background: var(--card);
  color: var(--ink); text-decoration: none;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.atlas-card:hover { transform: translateY(-3px); border-color: #e9b58f; box-shadow: var(--shadow-lift); }
.atlas-card strong { font-size: 1rem; font-weight: 800; line-height: 1.5; }
.atlas-card strong em { margin-inline-start: .4rem; padding: .05rem .45rem; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark); font-size: .68rem; font-style: normal; font-weight: 780; vertical-align: middle; }
.atlas-card span, .atlas-card small { color: var(--muted); font-size: .78rem; line-height: 1.7; }

.atlas-cloud { display: flex; flex-wrap: wrap; gap: .4rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.atlas-cloud a {
  display: inline-flex; align-items: center; gap: .45rem;
  min-height: 2.6rem; padding: .3rem .75rem;
  border: 1px solid var(--line); border-radius: 999px; background: rgba(255, 253, 249, .8);
  color: var(--ink); font-size: .82rem; font-weight: 700; text-decoration: none;
}
.atlas-cloud a:hover { border-color: #e9b58f; color: var(--orange-dark); }
.atlas-cloud b { color: var(--orange-dark); font-size: .76rem; font-variant-numeric: tabular-nums; }

.atlas-groups { display: grid; gap: .75rem; margin: .9rem 0 0; padding: 0; list-style: none; }
.atlas-group { padding: .95rem 1.1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--card); }
.atlas-group h3 { margin: 0 0 .5rem; font-size: .98rem; }
.atlas-group h3 b { margin-inline-start: .4rem; color: var(--orange-dark); font-variant-numeric: tabular-nums; }
.atlas-group ul { margin: 0; padding: 0; list-style: none; columns: 2; column-gap: 1.5rem; }
.atlas-group li { break-inside: avoid; margin: 0; padding: .3rem 0; border-bottom: 1px dashed var(--line); font-size: .86rem; line-height: 1.7; }
.atlas-group li a { color: var(--orange-dark); text-decoration: none; }
.atlas-group li a:hover { text-decoration: underline; }
@media (max-width: 40rem) { .atlas-group ul { columns: 1; } }

.atlas-tags { display: flex; flex-wrap: wrap; gap: .4rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.atlas-tags li { padding: .35rem .8rem; border-radius: 999px; background: var(--orange-soft); color: var(--orange-dark); font-size: .8rem; font-weight: 760; }

.atlas-coverage { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 14rem), 1fr)); gap: .5rem; margin: .8rem 0 0; padding: 0; list-style: none; }
.atlas-coverage li { padding: .6rem .9rem; border: 1px solid var(--line); border-radius: .8rem; background: #faf5ef; color: var(--body); font-size: .82rem; line-height: 1.7; }
.atlas-coverage--pairs li { display: flex; justify-content: space-between; gap: .6rem; }
.atlas-coverage--pairs b { color: var(--green); font-weight: 760; text-align: left; }

.atlas-guide .quick-answer { margin: .8rem 0 1rem; }
.atlas-guide .quick-answer strong { display: inline; margin-inline-end: .35rem; }
.atlas-main .game-cta { margin: clamp(2rem, 4vw, 3rem) 0 0; }
.atlas-main .table-wrap { margin: 1rem 0 0; }
.atlas-main table { min-width: 0; }

@media (prefers-reduced-motion: reduce) {
  .hub-tool, .hub-provinces a, .atlas-card, .hub-tool::after { transition: none; }
}
