/* ---------------------------------------------------------------------------
   The Portugal Brief · Guides
   Tracks the main Ghost theme at theportugalbrief.pt: the news look of
   kanban #77. Design tokens live at the top; the header, navigation, footer,
   section title and chip rules below repeat the theme's ptb- rules
   (theme/headline-modified-prod/assets/css/ptb-brand.css) so the two read as
   one site. Change both together. Light only: the main site has no dark mode.
--------------------------------------------------------------------------- */
:root {
  /* Palette — same values the Ghost theme resolves to */
  --color-white: #FFFFFF;
  --color-lighter-gray: #F5F7F9;
  --color-light-gray: #E4E5E7;
  --color-mid-gray: #C9CCD1;
  --color-secondary-text: #5C6168;
  --color-darker-gray: #15171A;
  --pink: #FF1A75;              /* the signature: rules, bars, underlines; never text */
  --accent: #D1105A;            /* pink for text and buttons (5.3:1) */
  --accent-hover: #B00D4B;
  --accent-ink: #FFFFFF;
  --navy: #2B4760;              /* top bar, footer, info boxes; not buttons */
  --teal: #9EC9C7;              /* topic chips only */
  --blue: #5086B5;              /* topic chips only */

  /* 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: #3F444A;
  --muted: var(--color-secondary-text);
  --line: var(--color-light-gray);
  --line-strong: var(--color-mid-gray);
  --highlight: #FFE0EC;          /* pink-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: 3px;
  --radius: 3px;
  --radius-sm: 3px;

  --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: Inter; font-style: normal; font-weight: 800; font-display: swap;
  src: local(""), url(https://theportugalbrief.pt/assets/fonts/inter-v20-latin-800.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-serif);
  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(--ink); outline-offset: 2px; }

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

/* Header: top bar, masthead, navigation, as on every page of the main site.
   kanban #156: no Subscribe on the masthead line (the top bar keeps it); sizes in rem. */
/* The navy top bar (kanban #138), as theme ptb-brand.css: a three-column
   grid at every width, the tagline and Subscribe centred as one group, the
   social icons on the right. */
.ptb-topbar {
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; column-gap: 10px;
  padding: 7px max(calc((100% - var(--container-width)) / 2), 4vmin, 20px);
  font-family: var(--font-sans); font-size: 13px; line-height: 1.25; color: #fff; background: var(--navy);
}
.ptb-topbar-main { grid-column: 2; display: flex; align-items: center; justify-content: center; gap: 12px; min-width: 0; }
.ptb-topbar-text { margin: 0; min-width: 0; }
.ptb-topbar-main .ptb-btn { flex: none; }
.ptb-topbar-social { grid-column: 3; justify-self: end; display: flex; align-items: center; gap: 12px; }
.ptb-topbar-social a { display: inline-flex; color: #fff; opacity: .8; }
.ptb-topbar-social a:hover, .ptb-topbar-social a:focus-visible { opacity: 1; }
.ptb-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; margin: 0;
  padding: 9px 16px; font-family: var(--font-sans); font-size: 14px; font-weight: 600; line-height: 1.2;
  color: #fff; white-space: nowrap; text-decoration: none;
  background: var(--accent); border: 0; border-radius: 3px; cursor: pointer;
}
.ptb-btn:hover { color: #fff; background: var(--accent-hover); }
.ptb-btn-sm { padding: 4px 11px; font-size: 12.5px; }

.ptb-head { font-family: var(--font-sans); background: var(--color-white); border-bottom: 3px solid var(--ink); }
.ptb-mast {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 1rem; align-items: center;
  padding: 16px max(calc((100% - var(--container-width)) / 2), 4vmin, 20px);
  border-bottom: 1px solid var(--line);
}
.ptb-mast-date { margin: 0; font-size: 0.8125rem; color: var(--muted); }
.ptb-mast-brand { min-width: 0; display: flex; justify-content: center; }
.ptb-brand { min-width: 0; display: inline-flex; align-items: center; gap: 0.625rem; color: var(--ink); text-decoration: none; }
.ptb-brand-mark { display: block; flex: none; width: 40px; height: 40px; }
.ptb-brand-name { min-width: 0; font-family: var(--font-serif); font-size: 1.625rem; font-weight: 700; line-height: 1.1; letter-spacing: -0.01em; white-space: nowrap; }
.ptb-mast-actions { flex: none; display: flex; align-items: center; justify-content: flex-end; gap: 1rem; }
.ptb-icon-btn { display: inline-flex; align-items: center; justify-content: center; padding: 4px; color: var(--ink); background: none; border: 0; cursor: pointer; }
.ptb-icon-btn:hover { color: var(--accent); }
.ptb-signin { font-size: 0.875rem; font-weight: 500; color: var(--ink); text-decoration: none; white-space: nowrap; }
.ptb-signin:hover { color: var(--accent); }
.ptb-nav { padding: 0 16px; }
.ptb-nav .nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 28px; }
.ptb-nav .nav a {
  display: block; padding: 12px 0 9px; font-size: 0.9062rem; font-weight: 600; color: var(--ink);
  text-decoration: none; border-bottom: 3px solid transparent;
}
.ptb-nav .nav a:hover { border-bottom-color: var(--line); }
.ptb-nav .nav-current a, .ptb-nav .nav-current a:hover { border-bottom-color: var(--pink); }
@media (max-width: 767px) {
  .ptb-mast { grid-template-columns: minmax(0, 1fr) auto; gap: 0.75rem; padding: 12px 16px; }
  /* kanban #156: on phones the name may wrap onto a second line; it never touches or runs under Sign in. */
  .ptb-brand { max-width: 100%; }
  .ptb-brand-name { white-space: normal; overflow-wrap: break-word; text-wrap: balance; }
  .ptb-mast-date { display: none; }
  .ptb-mast-brand { justify-content: flex-start; min-width: 0; }
  .ptb-brand { gap: 0.5rem; }
  .ptb-brand-mark { width: 30px; height: 30px; }
  .ptb-brand-name { font-size: 1.1875rem; }
  .ptb-mast-actions { gap: 0.5rem; }
  .ptb-signin { font-size: 0.8125rem; }
  .ptb-nav { padding: 0 12px; }
  .ptb-nav .nav { gap: 0 18px; }
  .ptb-nav .nav a { padding: 10px 0 8px; font-size: 0.875rem; }
}
/* Four menu items on one line on any phone, as in the theme (kanban #137): no
   sideways scroll any more; the base rule's wrap is the fallback for very large text. */
@media (max-width: 429px) {
  .ptb-nav { padding: 0 8px; }
  .ptb-nav .nav { gap: 0 18px; }
}
@media (max-width: 379px) {
  .ptb-nav .nav { gap: 0 14px; }
}
@media (max-width: 479px) {
  .ptb-topbar { column-gap: 0.5rem; padding: 6px 10px; font-size: 0.75rem; }
  .ptb-topbar-main, .ptb-topbar-social { gap: 0.5rem; }
  .ptb-brand-mark { width: 28px; height: 28px; }
  .ptb-brand-name { font-size: 1.125rem; }
}

/* Section title: Inter 800 with the 6px pink bar */
.ptb-section-title {
  display: flex; gap: 12px; align-items: center; margin: 0;
  font-family: var(--font-sans); font-size: clamp(28px, 3.4vw, 34px); font-weight: 800; line-height: 1.15;
  letter-spacing: -0.01em; color: var(--ink);
}
.ptb-section-title::before { content: ""; flex: none; align-self: stretch; width: 6px; min-height: .9em; background: var(--pink); }

/* Hero + search ----------------------------------------------------------- */
.hero { padding-block: 32px 20px; text-align: left; max-width: none; }
.hero__deck { margin-top: 10px; font-family: var(--font-serif); font-size: clamp(18px, 1.8vw, 21px); color: var(--ink); }
.hero__lede { margin-top: 8px; max-width: 70ch; font-family: var(--font-sans); font-size: 16px; color: var(--muted); text-wrap: pretty; }

.search { position: relative; margin: 20px 0 0; max-width: 760px; display: flex; align-items: stretch; gap: 8px; flex-wrap: wrap; }
.search__field {
  position: relative; flex: 1 1 280px; min-width: 0; display: flex; align-items: center;
  background: var(--color-white); border: 1px solid var(--line-strong); border-radius: 3px;
}
.search__field:focus-within { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
.search__submit { padding-inline: 20px; font-size: 15px; }
.search__icon { position: absolute; left: 14px; width: 20px; height: 20px; 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: 16px; color: var(--ink);
  padding: 12px 84px 12px 44px; background: transparent; border: 0; border-radius: 3px; 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: 44px; width: 30px; height: 30px; 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: 12px 44px 12px 42px; }
  .search__icon { left: 13px; width: 19px; height: 19px; }
  .search__clear { right: 10px; }
}
@media (hover: none) { .search__kbd { display: none; } }

.quick { margin-top: 16px; display: flex; align-items: center; justify-content: flex-start; 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: flex-start; gap: 8px; }
/* Topic chips in Thrifty Explorations teal and blue: light tint, coloured border, dark text */
.quick__chips .chip { padding: 5px 10px; font-size: 13px; font-weight: 600; color: #2D5A58; background: #EEF4F4; border-color: var(--teal); }
.quick__chips .chip:nth-child(even) { color: #2F5B82; background: #EEF3F9; border-color: #B9CDE2; }
.quick__chips .chip:hover { color: var(--ink); border-color: var(--blue); }

/* 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: 760px; margin: 22px 0 0; justify-content: flex-start;
  font-family: var(--font-sans); font-size: 13px; line-height: 1.55;
  text-align: left; text-wrap: pretty; color: var(--muted);
}
.disclaimer a { color: inherit; text-decoration: underline; text-decoration-color: var(--pink); text-underline-offset: 2px; }
.disclaimer a:hover { color: var(--ink); }
.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; }
}

/* Signup band ------------------------------------------------------------- */
/* Between the hero and the filters. Ghost Portal sets .loading, .success and
   .error on the form, the same states as .gh-home-form on the main site. */
.signup {
  margin: 8px 0 40px; padding: clamp(20px, 3vw, 28px) clamp(18px, 3vw, 28px);
  background: var(--surface-2); border-left: 4px solid var(--navy); text-align: left;
}
.signup__title { max-width: 640px; font-size: clamp(20px, 2.4vw, 26px); line-height: 1.3; text-wrap: balance; }
.signup__form { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-start; max-width: 520px; margin: 16px 0 0; }
.signup__input {
  flex: 1 1 260px; min-width: 0; padding: 12px 18px;
  font-family: var(--font-sans); font-size: 16px; color: var(--ink);
  background: var(--color-white); border: 1px solid var(--line-strong); border-radius: var(--radius-pill);
  -webkit-appearance: none; appearance: none;
}
.signup__input::placeholder { color: var(--muted); }
.signup__input:focus { border-color: var(--ink); outline: 2px solid var(--ink); outline-offset: 0; }
.signup__submit { justify-content: center; }
.signup__busy, .signup__form.loading .signup__label { display: none; }
.signup__form.loading .signup__busy { display: inline; }
.signup__msg { display: none; flex-basis: 100%; margin-top: 4px; font-family: var(--font-sans); font-size: 14px; }
.signup__form.success .signup__msg--success { display: block; color: var(--ink); }
.signup__form.success .signup__input, .signup__form.success .signup__submit { display: none; }
.signup__form.error .signup__msg--error { display: block; color: #c0392b; }
.signup__newsletters {
  display: flex; flex-basis: 100%; flex-wrap: wrap; justify-content: flex-start; gap: 6px 18px;
  margin: 6px 0 0; padding: 0; border: 0;
  font-family: var(--font-sans); font-size: 14px; color: var(--ink-2);
}
.signup__newsletter { display: inline-flex; align-items: center; gap: 6px; cursor: pointer; }
.signup__newsletter input { margin: 0; accent-color: var(--accent); }
.signup__form.success .signup__newsletters { display: none; }
@media (max-width: 860px) { .signup { margin-bottom: 24px; } }
@media (max-width: 640px) { .signup__submit { flex: 1 1 100%; } }
/* Centred (kanban #80): headline, the field and button as one row (stacked on
   a phone), the four boxes as a group, and the messages under them. */
#signup.signup { text-align: center; }
#signup .signup__title { margin-left: auto; margin-right: auto; }
#signup .signup__form { justify-content: center; margin-left: auto; margin-right: auto; }
#signup .signup__newsletters { display: grid; grid-template-columns: repeat(2, max-content); justify-content: center; justify-items: start; text-align: left; }
@media (max-width: 640px) { #signup .signup__newsletters { grid-template-columns: max-content; } }

/* 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(--ink); color: var(--ink); }
.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(--surface-2); color: var(--ink); font-weight: 600; box-shadow: inset 3px 0 0 var(--pink); }
.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(--ink); }
.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: background .15s ease, color .15s ease;
}
.btn:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn--ghost:hover { background: var(--surface-2); color: var(--ink); border-color: var(--ink); }

/* 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); }
.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(--ink); 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: 700; color: var(--accent); letter-spacing: .1em; text-transform: uppercase; font-size: 11.5px; }
.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 { text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.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(--ink); 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-family: var(--font-sans); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; display: flex; gap: 10px; align-items: center; }
.home__title::before { content: ""; flex: none; align-self: stretch; width: 5px; background: var(--pink); }
.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(--ink); }
.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; }

/* Start here sign-up tile, last in the row (kanban #57). Same frame as a hub
   tile; the form stacks so it fits a 200px column. */
.hub--signup { height: 100%; }
.hub--signup:hover { border-color: var(--line); box-shadow: none; transform: none; }
.hub__text { margin-top: 8px; font-family: var(--font-sans); font-size: 13px; line-height: 1.45; color: var(--ink-2); }
.signup__form--tile { flex-direction: column; align-items: stretch; gap: 8px; max-width: none; margin: 12px 0 0; }
.signup__form--tile .signup__input { flex: 0 0 auto; width: 100%; min-width: 0; font-size: 15px; }
.signup__form--tile .signup__submit { flex: 0 0 auto; width: 100%; }
.signup__form--tile .signup__msg { margin-top: 0; font-size: 13px; }
@media (max-width: 640px) { .hubgrid__signup { grid-column: 1 / -1; } }

.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(--ink); }
.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; }
/* One-line sign-up under the empty state (kanban #57) */
.signup__form--line { margin-top: 20px; }
.signup__lead { flex-basis: 100%; font-family: var(--font-sans); font-size: 15px; color: var(--ink-2); }


/* Footer: navy, as on every page of the main site */
.ptb-foot { margin-top: 48px; font-family: var(--font-sans); color: #E8EDF2; background: var(--navy); }
.ptb-foot-inner { max-width: var(--container-width); margin: 0 auto; padding: 36px max(4vmin, 20px) 28px; }
.ptb-foot a, .ptb-foot a:hover { color: #fff; }
.gh-subscribe { max-width: 640px; margin: 0 auto 32px; padding-bottom: 32px; text-align: center; border-bottom: 1px solid rgba(255,255,255,.18); }
.gh-subscribe-title { font-family: var(--font-serif); font-weight: 700; font-size: 24px; margin-bottom: 8px; color: #fff; }
.gh-subscribe-description { font-family: var(--font-sans); font-size: 15px; line-height: 1.5; color: #E8EDF2; }
.gh-subscribe-form { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; max-width: 520px; margin: 18px auto 0; }
.gh-subscribe-input {
  flex: 1 1 260px; min-width: 0; padding: 10px 12px;
  font-family: var(--font-sans); font-size: 15px; color: var(--ink);
  background: #fff; border: 1px solid #fff; border-radius: 3px;
  -webkit-appearance: none; appearance: none;
}
.ptb-foot .gh-subscribe-btn {
  display: inline-flex; align-items: center; gap: 6px; margin: 0; padding: 10px 18px;
  font-size: 15px; font-weight: 600; color: #fff; background: var(--accent);
  border: 0; border-radius: 3px; cursor: pointer;
}
.ptb-foot .gh-subscribe-btn:hover { color: #fff; background: var(--accent-hover); }
.gh-subscribe-form.loading .signup__label { display: none; }
.gh-subscribe-form.loading .signup__busy { display: inline; }
.gh-subscribe-newsletters { justify-content: center; color: #E8EDF2; }
.gh-subscribe-newsletters input { accent-color: var(--accent); }
.gh-subscribe-form.success .signup__msg--success { display: block; color: #fff; }
.gh-subscribe-form.error .signup__msg--error { display: block; color: #FFD0DC; }
.gh-subscribe-form.success .gh-subscribe-input, .gh-subscribe-form.success .gh-subscribe-btn, .gh-subscribe-form.success .gh-subscribe-newsletters { display: none; }
@media (max-width: 640px) { .ptb-foot .gh-subscribe-form .gh-subscribe-btn { flex: 1 1 100%; justify-content: center; } }

.ptb-foot-main { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px 32px; }
.ptb-foot-brand .ptb-brand-mark { width: 34px; height: 34px; }
.ptb-foot-brand .ptb-brand-name { font-size: 20px; }
.ptb-foot-publisher { margin-top: 6px; font-size: 13px; color: #C5D1DC; }
.ptb-foot-links .nav { display: flex; flex-wrap: wrap; gap: 6px 20px; font-size: 14px; font-weight: 500; }
.ptb-foot-links .nav a { text-decoration: none; }
.ptb-foot-links .nav a:hover { text-decoration: underline; text-decoration-color: var(--pink); text-decoration-thickness: 2px; text-underline-offset: 4px; }
.ptb-foot-social { display: flex; align-items: center; gap: 18px; }
.ptb-foot-social a { display: inline-flex; opacity: .85; }
.ptb-foot-social a:hover { opacity: 1; }
.ptb-foot-small { margin-top: 24px; padding-top: 16px; font-size: 12px; color: #C5D1DC; border-top: 1px solid rgba(255,255,255,.18); }
.ptb-foot-small a, .ptb-foot-small a:hover { color: #C5D1DC; }
.ptb-foot :focus-visible { outline-color: #fff; }
@media (max-width: 767px) {
  .ptb-foot-main { flex-direction: column; align-items: flex-start; }
}

/* 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); }
