/* ---------------------------------------------------------------------------
   The Portugal Brief · Guides
   Tracks the main Ghost theme at theportugalbrief.pt. Design tokens live at
   the top; the header and footer below mirror the theme's `gh-` chrome so the
   two sites read as one. Light only — the main site has no dark mode.
--------------------------------------------------------------------------- */
:root {
  /* Palette — same values the Ghost theme resolves to */
  --color-white: #FFFFFF;
  --color-lighter-gray: #F6F6F6;
  --color-light-gray: #E6E6E6;
  --color-mid-gray: #CCCCCC;
  --color-secondary-text: #999999;
  --color-darker-gray: #15171A;
  --accent: #FF1A75;
  --accent-ink: #FFFFFF;

  /* Semantic aliases used through the app */
  --paper: var(--color-white);
  --surface: var(--color-white);
  --surface-2: var(--color-lighter-gray);
  --ink: var(--color-darker-gray);
  --ink-2: #4A4E55;
  --muted: var(--color-secondary-text);
  --line: var(--color-light-gray);
  --line-strong: var(--color-mid-gray);
  --highlight: #FFE3ED;          /* accent-tinted search-term highlight */

  --shadow: 0 1px 2px rgba(21, 23, 26, .05), 0 8px 24px -14px rgba(21, 23, 26, .18);
  --shadow-lg: 0 2px 4px rgba(21, 23, 26, .06), 0 24px 48px -22px rgba(21, 23, 26, .26);

  --radius-pill: 100px;
  --radius: 8px;
  --radius-sm: 6px;

  --font-sans: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --font-serif: Lora, Georgia, Times, serif;

  --container-width: 1200px;
  --gap: 36px;
  --head-nav-gap: 32px;

  color-scheme: light;
  accent-color: var(--accent);
}
@media (max-width: 767px) {
  :root { --gap: 20px; }
}

/* Fonts — served by the main site, same origin once deployed at /guides/ ---- */
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/inter-v12-latin-regular.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 500; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/inter-v12-latin-500.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/inter-v12-latin-600.woff2) format("woff2"); }
@font-face { font-family: Inter; font-style: normal; font-weight: 700; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/inter-v12-latin-700.woff2) format("woff2"); }
@font-face { font-family: Lora; font-style: normal; font-weight: 400; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/lora-v25-latin-regular.woff2) format("woff2"); }
@font-face { font-family: Lora; font-style: normal; font-weight: 500; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/lora-v25-latin-500.woff2) format("woff2"); }
@font-face { font-family: Lora; font-style: normal; font-weight: 600; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/lora-v25-latin-600.woff2) format("woff2"); }
@font-face { font-family: Lora; font-style: normal; font-weight: 700; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/lora-v25-latin-700.woff2) format("woff2"); }
@font-face { font-family: Lora; font-style: italic; font-weight: 400; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/lora-v25-latin-italic.woff2) format("woff2"); }

/* Base --------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body {
  margin: 0;
  overflow-x: clip;
  background-color: var(--color-white);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
a { color: inherit; }
button { font: inherit; color: inherit; }
h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.15;
}
p { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
mark { background: var(--highlight); color: inherit; border-radius: 3px; padding: 0 .08em; box-decoration-break: clone; -webkit-box-decoration-break: clone; }
::selection { background: var(--highlight); }

.gh-outer { padding-left: var(--gap); padding-right: var(--gap); }
.gh-inner { margin: 0 auto; max-width: var(--container-width); }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; background: var(--ink); color: var(--color-white); padding: 8px 12px; border-radius: var(--radius); z-index: 100; font-family: var(--font-sans); }
.skip:focus { top: 8px; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.gh-site { display: flex; flex-direction: column; min-height: 100vh; }
main { flex: 1 0 auto; }

/* Header — mirrors .gh-head on the main site ------------------------------- */
.gh-head { background-color: var(--color-white); font-family: var(--font-sans); }
.gh-head-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  column-gap: var(--head-nav-gap);
  position: relative;
}
.gh-head-brand { grid-column-start: 2; grid-row-start: 1; display: flex; align-items: center; height: 80px; line-height: 1; }
.gh-head-brand-wrapper { display: flex; align-items: center; }
.gh-head-logo { font-family: var(--font-sans); font-size: 24px; font-weight: 700; letter-spacing: -0.02em; margin: 0; }
.gh-head-logo a { text-decoration: none; color: var(--ink); }

.gh-head-actions { grid-column: 1 / 4; grid-row-start: 1; display: flex; align-items: center; justify-content: space-between; gap: var(--head-nav-gap); }
.gh-head-members { display: flex; align-items: center; gap: 20px; white-space: nowrap; }
.gh-head-link { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); }
.gh-head-link:hover { color: var(--accent); }
.gh-head-btn {
  display: inline-flex; align-items: center;
  background-color: var(--accent); color: var(--accent-ink);
  font-size: 15px; font-weight: 600; text-decoration: none;
  padding: 8px 18px; border-radius: var(--radius-pill);
  transition: opacity .15s ease;
}
.gh-head-btn:hover { opacity: .9; color: var(--accent-ink); }
.gh-icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 0; border: 0; background: none; color: var(--ink); cursor: pointer; }
.gh-search { margin-left: -6px; margin-right: -6px; }   /* theme's optical inset */
.gh-icon-btn:hover { color: var(--accent); }
.gh-head-brand .gh-search { display: none; }

/* Burger — the theme's own icon: two rules that fold into an X when open. */
.gh-burger {
  -webkit-appearance: none; -moz-appearance: none; appearance: none;
  display: none; position: relative;
  width: 30px; height: 30px; margin-right: -3px; padding: 0;
  background-color: transparent; border: 0; cursor: pointer;
}
.gh-burger::before, .gh-burger::after {
  content: ""; position: absolute; left: 3px; width: 24px; height: 1px;
  background-color: var(--color-darker-gray);
  transition: all .2s cubic-bezier(.04, .04, .12, .96) .1008s;
}
.gh-burger::before { top: 11px; }
.gh-burger::after { bottom: 11px; }
.is-head-open .gh-burger::before { top: 15px; transform: rotate(45deg); }
.is-head-open .gh-burger::after { bottom: 14px; transform: rotate(-45deg); }

.gh-head-menu {
  grid-column: 1 / 4; grid-row-start: 2;
  display: flex; align-items: center; justify-content: center;
  gap: var(--head-nav-gap);
  height: 56px;
  position: relative;
}
/* The rules above and below the nav run the full width of the viewport,
   the way they do on the main site, not just the width of the container. */
.gh-head-menu::before, .gh-head-menu::after {
  content: ""; position: absolute; left: 50%; margin-left: -50vw; width: 100vw;
  height: 1px; background-color: var(--color-light-gray);
}
.gh-head-menu::before { top: 0; }
.gh-head-menu::after { bottom: 0; }
.gh-head-menu .nav { display: inline-flex; align-items: center; gap: var(--head-nav-gap); white-space: nowrap; }
.gh-head-menu .nav a { font-size: 15px; font-weight: 500; text-decoration: none; color: var(--ink); }
.gh-head-menu .nav a:hover { color: var(--accent); }
.gh-head-social { display: inline-flex; align-items: center; gap: 14px; }
.gh-head-social a { display: inline-flex; align-items: center; color: inherit; opacity: .65; transition: opacity .15s ease; }
.gh-head-social a:hover { opacity: 1; }

/* Mobile: the header becomes the theme's full-screen menu, opened by the
   burger. `is-head-open` on <body> is the same switch the main site uses. */
@media (max-width: 767px) {
  .gh-head { height: 64px; }
  .gh-head-inner { grid-template-columns: 1fr; grid-template-rows: auto 1fr auto; gap: 48px; }
  .gh-head-brand {
    grid-column-start: 1; grid-row-start: 1;
    display: grid; grid-template-columns: 1fr auto auto; align-items: center; height: 64px;
  }
  .gh-head-logo { font-size: 22px; }
  .gh-head-brand .gh-search { display: inline-flex; margin-right: 8px; }
  .gh-burger { display: block; }

  /* Closed: the nav and the members buttons are lifted out of the flow, so
     the header is just the 64px brand row. */
  .gh-head-menu, .gh-head-actions { justify-content: center; opacity: 0; position: fixed; visibility: hidden; }
  .gh-head-menu {
    grid-column: 1; grid-row-start: 2; height: auto; transition: none;
    flex-direction: column; gap: 32px;   /* social icons sit below the links */
  }
  .gh-head-menu::before, .gh-head-menu::after { content: none; }   /* no desktop rules */
  .gh-head-menu .nav { align-items: center; gap: 20px; line-height: 1.4; }
  .gh-head-menu .nav a { font-size: 26px; font-weight: 600; }
  .gh-head-menu .nav li { opacity: 0; transform: translateY(-4px); }
  .gh-head-social { justify-content: center; gap: 24px; opacity: 0; transform: translateY(-4px); }
  .gh-head-social a { opacity: .8; }
  .gh-head-social svg { width: 22px; height: 22px; }
  .gh-head-actions { grid-column: 1; grid-row-start: 3; text-align: center; }
  .gh-head-actions .gh-search { display: none; }
  .gh-head-members { flex-direction: column-reverse; gap: 16px; width: 100%; }
  .gh-head-btn, .gh-head-link { opacity: 0; transform: translateY(8px); }
  .gh-head-btn { font-size: 18px; width: 100%; justify-content: center; }
  .gh-head-link { font-size: 16px; }

  /* Open: a full-screen sheet over the page, members pinned to the bottom. */
  .is-head-open .gh-head {
    position: fixed; inset: 0; height: 100%; z-index: 3999999;
    overflow-y: scroll; -webkit-overflow-scrolling: touch;
    background-color: var(--color-white);
  }
  .is-head-open .gh-head-inner { min-height: 100%; }
  .is-head-open .gh-head-menu,
  .is-head-open .gh-head-actions { opacity: 1; position: static; visibility: visible; }
  .is-head-open .gh-head-menu .nav { display: flex; flex-direction: column; }
  .is-head-open .gh-head-menu .nav li { opacity: 1; transform: translateY(0); transition: transform .2s, opacity .2s; }
  .is-head-open .gh-head-social { opacity: 1; transform: translateY(0); transition: transform .2s, opacity .2s; transition-delay: .1s; }
  .is-head-open .gh-head-actions {
    position: sticky; bottom: 0; left: 0; right: 0;
    display: inline-flex; flex-direction: column; align-items: center; gap: 12px;
    padding: var(--gap) 0 calc(var(--gap) + 8px);
    background-color: var(--color-white);
  }
  .is-head-open .gh-head-btn,
  .is-head-open .gh-head-link { opacity: 1; transform: translateY(0); transition: transform .4s, opacity .4s; transition-delay: .2s; }
  .is-head-open .gh-head-link { transition-delay: .4s; }
}

/* Hero + search ----------------------------------------------------------- */
.hero { padding-block: clamp(40px, 7vw, 80px) 24px; text-align: center; max-width: 780px; margin-inline: auto; }
.kicker { font-family: var(--font-sans); font-size: 13px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); margin-bottom: 16px; }
.hero__title { font-size: clamp(32px, 5.2vw, 56px); text-wrap: balance; }
.hero__lede { margin-top: 16px; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); text-wrap: pretty; }

.search {
  position: relative; margin: 32px auto 0; max-width: 680px;
  display: flex; align-items: center;
  background: var(--color-white); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  transition: box-shadow .18s ease, border-color .18s ease;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(255, 26, 117, .12); }
.search__icon { position: absolute; left: 20px; width: 22px; height: 22px; fill: none; stroke: var(--muted); stroke-width: 2; stroke-linecap: round; pointer-events: none; }
.search__input {
  flex: 1; min-width: 0; width: 100%;
  font-family: var(--font-sans); font-size: 17px; color: var(--ink);
  padding: 17px 96px 17px 54px; background: transparent; border: 0; border-radius: var(--radius-pill); outline: 0;
  -webkit-appearance: none; appearance: none;
}
.search__input::placeholder { color: var(--muted); }
.search__input::-webkit-search-cancel-button, .search__input::-webkit-search-decoration { -webkit-appearance: none; appearance: none; }
.search__clear {
  position: absolute; right: 54px; width: 32px; height: 32px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: var(--surface-2); cursor: pointer; color: var(--ink);
}
.search__clear svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; }
.search__clear:hover { background: var(--line); }
.search__kbd {
  position: absolute; right: 16px; font-family: var(--font-sans); font-size: 12px; font-weight: 600; color: var(--muted);
  border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: var(--radius-sm); padding: 2px 8px; background: var(--surface-2);
}
@media (max-width: 640px) {
  .search__kbd { display: none; }
  .search__input { font-size: 16px; padding: 15px 52px 15px 48px; }
  .search__icon { left: 16px; width: 20px; height: 20px; }
  .search__clear { right: 10px; }
}
@media (hover: none) { .search__kbd { display: none; } }

.quick { margin-top: 20px; display: flex; align-items: center; justify-content: center; flex-wrap: wrap; gap: 8px; font-family: var(--font-sans); font-size: 14px; }
.quick__label { color: var(--muted); font-weight: 500; margin-right: 2px; }
.quick__chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }

/* Disclaimer --------------------------------------------------------------- */
/* Sits under the hero search on the listing page, and under the post content
   on a guide (the Ghost theme injects the same markup there). */
.disclaimer {
  display: flex; align-items: flex-start; justify-content: center; gap: 8px;
  max-width: 620px; margin: 28px auto 0;
  font-family: var(--font-sans); font-size: 13px; line-height: 1.55;
  text-align: left; text-wrap: pretty; color: var(--muted);
}
.disclaimer__icon {
  flex: none; width: 15px; height: 15px; margin-top: 2px;
  fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round; opacity: .8;
}
@media (max-width: 640px) {
  .disclaimer { margin-top: 22px; font-size: 12.5px; }
}

/* Chips -------------------------------------------------------------------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-sans); font-size: 14px; font-weight: 500; line-height: 1;
  padding: 8px 14px; border-radius: var(--radius-pill); cursor: pointer;
  background: var(--color-white); color: var(--ink-2); border: 1px solid var(--line-strong);
  transition: background .12s ease, color .12s ease, border-color .12s ease;
  text-decoration: none; white-space: nowrap;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip--on { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip--filter { background: var(--surface-2); border-color: transparent; color: var(--ink); }
.chip--filter:hover { background: var(--line); color: var(--ink); border-color: transparent; }

/* Layout ------------------------------------------------------------------ */
.layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 48px; padding-block: 12px 80px; align-items: start; }
@media (max-width: 860px) { .layout { grid-template-columns: 1fr; gap: 16px; padding-bottom: 56px; } }

/* Filters ----------------------------------------------------------------- */
.filters { position: sticky; top: 24px; display: grid; gap: 28px; min-width: 0; font-family: var(--font-sans); }
.filters__group { min-width: 0; }
.filters__title { font-family: var(--font-sans); font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; display: block; }
.catlist { display: grid; gap: 2px; }
.catlist__btn {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 10px;
  text-align: left; border: 0; background: transparent; cursor: pointer;
  padding: 7px 10px; border-radius: var(--radius-sm); font-size: 15px; color: var(--ink-2); line-height: 1.3;
}
.catlist__btn:hover { background: var(--surface-2); color: var(--ink); }
.catlist__btn[aria-pressed="true"] { background: var(--highlight); color: var(--ink); font-weight: 600; }
.catlist__count { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.catlist__btn[aria-pressed="true"] .catlist__count { color: var(--ink-2); }
.catlist__btn.is-dim { color: var(--muted); }
.catlist__btn.is-dim .catlist__count { opacity: .6; }
.catlist__btn.is-hidden { display: none; }

.select {
  width: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  padding: 9px 36px 9px 12px; border-radius: var(--radius-pill); border: 1px solid var(--line-strong); background-color: var(--color-white);
  -webkit-appearance: none; appearance: none; cursor: pointer;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23999999' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat; background-position: right 12px center; background-size: 14px;
}
.select:hover { border-color: var(--accent); }
.select--compact { width: auto; padding-block: 6px; font-size: 14px; }

@media (max-width: 860px) {
  .filters { position: static; display: block; }
  .filters__group--inline { display: none; }        /* region moves into the results bar on mobile */
  .filters__title { display: none; }
  .catlist { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; margin-inline: calc(-1 * var(--gap)); padding-inline: var(--gap); scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .catlist::-webkit-scrollbar { display: none; }
  .catlist li { flex: 0 0 auto; }
  .catlist__btn { white-space: nowrap; padding: 8px 14px; border: 1px solid var(--line-strong); border-radius: var(--radius-pill); background: var(--color-white); font-size: 14px; }
  .catlist__btn[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
  .catlist__btn[aria-pressed="true"] .catlist__count { color: var(--accent-ink); opacity: .8; }
  .catlist__btn.is-hidden { display: none; }
}

/* Results ----------------------------------------------------------------- */
.results { min-width: 0; }
.results__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 6px 0 14px; border-bottom: 1px solid var(--line); margin-bottom: 20px; flex-wrap: wrap; font-family: var(--font-sans); }
.results__summary { font-size: 15px; color: var(--ink-2); }
.results__summary strong { color: var(--ink); font-weight: 600; }
.results__bar.is-home .results__sort { display: none; }
.results__sort { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.results__controls { display: flex; align-items: center; gap: 10px; }
.results__region { display: none; }
@media (max-width: 860px) { .results__region { display: block; } .results__region .select { width: auto; padding-block: 6px; font-size: 14px; } }
.results__more { text-align: center; padding: 32px 0 8px; }
#active-chips { margin-bottom: 16px; }

.btn {
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font-family: var(--font-sans); font-size: 15px; font-weight: 600; text-decoration: none;
  padding: 11px 22px; border-radius: var(--radius-pill);
  border: 1px solid var(--accent); background: var(--accent); color: var(--accent-ink);
  transition: opacity .15s ease, background .15s ease, color .15s ease;
}
.btn:hover { opacity: .9; }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); opacity: 1; }

/* Cards ------------------------------------------------------------------- */
.list { display: grid; gap: 12px; }
.list__divider { margin: 20px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); font-family: var(--font-sans); font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .02em; }
.results__related { color: var(--muted); font-weight: 400; }
.card {
  position: relative;
  background: var(--color-white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 20px 22px 18px;
  transition: border-color .15s ease, box-shadow .15s ease;
  animation: rise .28s ease both;
}
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.card:hover, .card:focus-within { border-color: var(--line-strong); box-shadow: var(--shadow); }
.card__link { text-decoration: none; display: block; }
.card__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.card__link:focus-visible { outline: none; }
.card:has(.card__link:focus-visible) { outline: 2px solid var(--accent); outline-offset: 2px; }
.card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; font-family: var(--font-sans); font-size: 12px; color: var(--muted); margin-bottom: 10px; }
.card__cat { position: relative; z-index: 1; font-weight: 600; color: var(--accent); letter-spacing: .02em; text-transform: uppercase; }
.card__cat.is-hub::before { content: "Start here"; display: inline-block; margin-right: 8px; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--highlight); color: var(--ink); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.card__meta > span + span::before { content: "·"; margin-right: 10px; color: var(--line-strong); }
.card__meta > .card__cat + span::before { content: "·"; }
.card__title { font-size: 21px; line-height: 1.25; text-wrap: pretty; }
.card__link:hover .card__title { color: var(--accent); }
.card__deck { margin-top: 8px; font-size: 16px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; text-wrap: pretty; }
.card__topic { margin-top: 10px; font-family: var(--font-sans); font-size: 13px; color: var(--muted); }
.card__topic b { font-weight: 600; color: var(--ink-2); }
.card__topic .card__region { color: var(--accent); font-weight: 600; }
.card--focus { border-color: var(--accent); box-shadow: var(--shadow); }
.list--compact .card { padding: 15px 18px 13px; }
.list--compact .card__title { font-size: 18px; }
.list--compact .card__deck { display: none; }
.list--compact .card__topic { margin-top: 6px; }
@media (max-width: 640px) {
  .card { padding: 16px 16px 14px; }
  .card__title { font-size: 19px; }
}

/* Home state -------------------------------------------------------------- */
.home { display: grid; gap: 48px; }
.home__head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.home__title { font-size: 24px; }
.home__sub { font-family: var(--font-sans); font-size: 14px; color: var(--muted); }
.home__all { margin-top: 20px; text-align: center; }

.hubgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; }
@media (max-width: 640px) { .hubgrid { grid-template-columns: repeat(2, 1fr); gap: 8px; } .hub { padding: 12px; } .hub__title { font-size: 16px; } }
.hub {
  display: block; padding: 16px 18px; text-decoration: none;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--color-white);
  transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.hub:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.hub__title { font-family: var(--font-sans); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.hub__sub { display: block; margin-top: 8px; font-family: var(--font-sans); font-size: 12px; color: var(--muted); }
.hub__sub b { color: var(--accent); font-weight: 600; }

.catgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.catcard {
  width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--color-white); padding: 16px 18px 14px;
  display: grid; gap: 6px; transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
}
.catcard:hover { border-color: var(--accent); box-shadow: var(--shadow); transform: translateY(-1px); }
.catcard__row { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; }
.catcard__name { font-family: var(--font-sans); font-size: 17px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.25; }
.catcard__count { font-family: var(--font-sans); font-size: 12px; color: var(--muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.catcard__topics { font-size: 14px; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

/* Empty state ------------------------------------------------------------- */
.empty { padding: 40px 8px; text-align: center; max-width: 560px; margin-inline: auto; }
.empty__title { font-size: 24px; text-wrap: balance; }
.empty__text { margin-top: 12px; color: var(--ink-2); }
.empty__text--small { margin-top: 20px; font-size: 14px; color: var(--muted); }
.empty__text a { color: var(--accent); }
.empty .chips { justify-content: center; margin-top: 16px; }

/* Footer — mirrors .gh-foot on the main site ------------------------------- */
.gh-foot {
  background-color: var(--color-darker-gray);
  color: var(--color-white);
  font-family: var(--font-sans);
  padding-top: 80px; padding-bottom: 120px;
}
.gh-foot, .gh-foot a, .gh-foot a:hover { color: var(--color-white); }
.gh-foot-inner { display: flex; flex-direction: column; align-items: center; gap: 24px; font-size: 14px; text-align: center; }
.gh-subscribe { margin-top: 40px; margin-bottom: 80px; text-align: center; }
.gh-subscribe-title { font-family: var(--font-serif); font-weight: 700; font-size: 44px; letter-spacing: -0.02em; color: var(--color-white); }
.gh-subscribe-description { font-family: var(--font-serif); font-size: 20px; margin-top: 16px; line-height: 1.5; }
.gh-subscribe-description .ptb-subscribe-lead,
.gh-subscribe-description .ptb-subscribe-sub { display: block; text-align: center; }
.gh-subscribe-description .ptb-subscribe-lead { font-weight: 700; }
.gh-subscribe-description .ptb-subscribe-sub { margin-top: 6px; font-weight: 400; opacity: .85; }
.gh-foot .gh-subscribe-btn {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 40px; padding: 12px 24px;
  background-color: var(--color-white); color: var(--color-darker-gray);
  border-radius: var(--radius-pill);
  font-size: 16px; font-weight: 600; letter-spacing: -.011em; text-decoration: none;
  transition: opacity .15s ease;
}
.gh-foot .gh-subscribe-btn:hover { opacity: .9; color: var(--color-darker-gray); }

.gh-foot-menu { width: 100%; border-top: 1px solid rgba(255,255,255,.15); padding: 16px 0; text-align: center; }
.gh-foot-menu .nav { display: inline-flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 32px; row-gap: 4px; font-weight: 500; }
.gh-foot-menu .nav li { display: flex; align-items: center; }
.gh-foot-menu .nav a { text-decoration: none; opacity: .9; }
.gh-foot-menu .nav a:hover { opacity: 1; text-decoration: underline; }
.gh-copyright { margin-top: 40px; opacity: .9; }
.gh-copyright a { text-decoration: underline; }
.gh-foot-operator { font-size: 12px; opacity: .5; margin-top: 8px; }
.gh-foot-contact { font-size: 12px; margin-top: 4px; }
.gh-foot-contact a { opacity: .5; text-decoration: none; }
.gh-foot-contact a:hover { opacity: .9; text-decoration: underline; }
.gh-foot-social { display: flex; justify-content: center; align-items: center; gap: 18px; margin-top: 10px; }
.gh-foot-social a { display: inline-flex; align-items: center; opacity: .5; transition: opacity .15s ease; }
.gh-foot-social a:hover { opacity: .9; }

@media (max-width: 767px) {
  .gh-foot { padding-top: 56px; padding-bottom: 64px; }
  .gh-subscribe { margin-bottom: 32px; }
  .gh-subscribe-title { font-size: 32px; }
  .gh-subscribe-description { font-size: 17px; }
  .gh-foot-menu .nav { flex-direction: column; gap: 8px; }
}

/* Loading ----------------------------------------------------------------- */
.is-loading .list, .is-loading .home { opacity: .4; pointer-events: none; }
.error { padding: 24px; border: 1px solid var(--line-strong); border-radius: var(--radius); background: var(--color-white); text-align: center; color: var(--ink-2); }
.error a { color: var(--accent); }
