/* FishExtender Blog: layout and components shared by every page.
   Article-only styles live in article.css. Breakpoints: 1050 (mosaic),
   1000 (topics), 820 (mobile header, hero), 620 (mosaic stack), 560 (phone). */

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    color: var(--ink);
    font: 600 16px/1.6 var(--font-body);
    background: var(--page-bg);
    background-color: #FFF8F5;
    overflow-x: clip;
}
.site-main { flex: 1; }
img, svg { max-width: 100%; }
img { height: auto; }
a { color: var(--link); text-decoration: none; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); color: var(--blue); font-weight: 600; line-height: 1.12; }
h1 { font-size: clamp(2.6rem, 5.4vw, 4rem); letter-spacing: -.025em; margin: 16px 0; }
h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin: 0 0 12px; }
h3 { font-size: 1.35rem; margin: 10px 0; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip-link { position: absolute; left: -10000px; top: 12px; z-index: 100; background: var(--white); padding: 10px 14px; border-radius: 8px; font-weight: 800; }
.skip-link:focus { left: 16px; }

.eyebrow { display: inline-block; font-size: 11px; line-height: 1.4; letter-spacing: .1em; text-transform: uppercase; font-weight: 800; color: var(--link); }
.meta { font-size: 12px; color: var(--muted); }
.empty-note { color: var(--muted); }

.button {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border-radius: var(--radius-pill); padding: 12px 20px;
    font-family: var(--font-display); font-size: 16px; font-weight: 600; line-height: 1.12;
    white-space: nowrap;
}
.button--app { background: var(--coral); color: var(--white); box-shadow: var(--shadow-cta); }
.button--app:hover { background: #A33B30; }
.button--primary { background: var(--link); color: var(--white); }

/* ---------- Wordmark ---------- */
.wordmark { font-family: var(--font-display); font-size: 22px; font-weight: 700; line-height: 1.12; color: var(--blue); white-space: nowrap; }
.wordmark__coral { color: var(--coral); }

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 20; border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 18px; min-height: var(--header-h); }
.site-nav { display: flex; align-items: center; gap: 24px; margin-left: auto; font-size: 13px; font-weight: 800; }
.site-nav a:not(.button) { color: var(--link); }
.site-nav a:not(.button):hover, .site-nav a[aria-current] { text-decoration: underline; text-underline-offset: 4px; }
.menu-toggle, .search-toggle {
    display: flex; align-items: center; justify-content: center; flex-shrink: 0;
    width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--link); cursor: pointer;
}
.search-toggle:hover, .search-toggle[aria-expanded="true"], .menu-toggle:hover { background: rgba(255, 255, 255, .65); }
.menu-toggle:focus-visible, .search-toggle:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.menu-toggle { display: none; }
.menu-toggle__close { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__open { display: none; }
.menu-toggle[aria-expanded="true"] .menu-toggle__close { display: block; }
.site-search { display: flex; align-items: center; }
/* Search needs JavaScript; without it the control is not offered. */
html:not(.js) .site-search { display: none; }

/* Wide screens: the search icon sits in the right gutter, as approved, so it
   never shifts the menu. Narrower screens keep it in the row. */
@media (min-width: 1260px) {
    /* Only the button moves; .site-search stays static so the strip below
       still spans the header, not the button. */
    .search-toggle { position: absolute; top: calc((var(--header-h) - 42px) / 2); right: max(12px, calc((100vw - 1270px) / 2)); }
    .site-search { margin-left: -18px; } /* cancel the row gap it no longer fills */
}

/* Search strip: full viewport width, directly under the header. */
.search-panel {
    position: absolute; top: 100%; left: 0; right: 0; z-index: 50;
    background: var(--white);
    border-top: 1px solid #EDF1F2; border-bottom: 1px solid #E7ECEE;
    box-shadow: 0 8px 15px rgba(20, 60, 80, .035);
    padding: 10px max(24px, calc((100vw - 1120px) / 2));
}
.search-panel[hidden] { display: none; }
.search-field { display: flex; align-items: center; gap: 20px; border-bottom: 2px solid transparent; }
.search-field:focus-within { border-bottom-color: rgba(0, 95, 157, .35); }
.search-field input {
    flex: 1; min-width: 0; width: 100%; border: 0; background: transparent; outline: none;
    font: 400 18px/1.4 var(--font-body); color: #164D6A; padding: 6px 0;
}
.search-field input::placeholder { color: var(--placeholder); }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-close { display: flex; border: 0; background: none; color: #6F848C; padding: 6px; cursor: pointer; border-radius: 50%; }
.search-close:hover { color: var(--link); }
.search-close:focus-visible { outline: 2px solid var(--link); outline-offset: 2px; }
.search-status { margin: 6px 0 0; font-size: 13px; color: #5E737B; }
.search-status:empty { display: none; }
.search-results { list-style: none; margin: 4px 0 0; padding: 0; max-height: min(320px, 60vh); overflow: auto; }
.search-results:empty { display: none; }
.search-results a { display: block; padding: 10px 4px; border-top: 1px solid #F0F3F4; font-size: 15px; font-weight: 600; }
.search-results a:hover, .search-results a:focus-visible { text-decoration: underline; }
.search-results a:focus-visible { outline-offset: -2px; outline-width: 2px; }
.search-results small { display: block; color: var(--muted); font-size: 12px; font-weight: 600; }

@media (max-width: 820px) {
    .site-header__inner { flex-wrap: wrap; column-gap: 6px; padding: 12px 22px; }
    .wordmark { font-size: 19px; }
    .menu-toggle { display: flex; order: 1; margin-left: auto; }
    .site-search { order: 2; }
    .site-nav {
        display: none; order: 3; flex-basis: 100%; margin-left: 0;
        flex-direction: column; align-items: stretch; gap: 16px; padding: 16px 0 20px;
    }
    .site-nav.is-open { display: flex; }
    .site-nav .button { width: 100%; max-width: 440px; margin: 12px auto 0; padding: 14px 24px; }
    .search-panel { padding: 8px 24px; }
    .search-field input { font-size: 17px; }
    /* No JavaScript: show the menu instead of a toggle that cannot work. */
    html:not(.js) .menu-toggle { display: none; }
    html:not(.js) .site-nav { display: flex; }
}

/* ---------- Hero ---------- */
.hero { position: relative; min-height: 450px; padding: 90px 0 100px; }
.hero__copy { position: relative; z-index: 2; pointer-events: none; }
.hero__copy a { pointer-events: auto; }
.hero__eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.hero__star { font-size: 20px; line-height: 1; letter-spacing: 0; }
.hero h1 { max-width: 650px; margin: 10px 0 16px; font-size: clamp(2.6rem, 4.2vw, 3.65rem); }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero p { max-width: 555px; margin: 16px 0; font-size: 17px; color: var(--muted); }

/* Peach-left / mint-right glow, full viewport width. */
.hero::before {
    content: ""; position: absolute; z-index: 0; pointer-events: none;
    top: -20px; bottom: -15px; left: calc(50% - 50vw); width: 100vw;
    background:
        radial-gradient(ellipse 360px 330px at 12% 35%, rgba(var(--glow-peach), .38) 0%, rgba(var(--glow-peach), .14) 47%, transparent 76%),
        radial-gradient(ellipse 430px 370px at 83% 68%, rgba(var(--glow-mint), .42) 0%, rgba(var(--glow-mint), .15) 48%, transparent 78%);
    -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 80%, transparent 100%);
    mask-image: linear-gradient(180deg, transparent 0%, #000 15%, #000 80%, transparent 100%);
}

.hero-art { position: absolute; inset: 0; z-index: 1; }
.hero-art__scene {
    position: absolute; inset: 0;
    /* Fade toward the copy on the left and off the top and bottom edges. */
    -webkit-mask-image:
        linear-gradient(90deg, transparent 0%, transparent 30%, rgba(0,0,0,.04) 42%, rgba(0,0,0,.35) 55%, #000 73%, #000 100%),
        linear-gradient(180deg, transparent 0%, #000 24%, #000 67%, transparent 100%);
    -webkit-mask-composite: source-in;
    mask-image:
        linear-gradient(90deg, transparent 0%, transparent 30%, rgba(0,0,0,.04) 42%, rgba(0,0,0,.35) 55%, #000 73%, #000 100%),
        linear-gradient(180deg, transparent 0%, #000 24%, #000 67%, transparent 100%);
    mask-composite: intersect;
}
.hero-art__svg { display: block; width: 100%; height: 100%; filter: drop-shadow(0 8px 10px rgba(0, 74, 108, .06)); }
.hero-art__pause {
    position: absolute; right: 18px; bottom: 16px;
    display: flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; padding: 0; border: 0; border-radius: 50%;
    background: transparent; color: var(--link); opacity: .55; cursor: pointer;
    transition: opacity .2s, background .2s;
}
.hero-art__pause:hover, .hero-art__pause:focus-visible { opacity: 1; background: rgba(255, 255, 255, .65); }
.hero-art__pause:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; }
.hero-art__play-icon { display: none; }
.hero-art__pause[aria-pressed="true"] .hero-art__pause-icon { display: none; }
.hero-art__pause[aria-pressed="true"] .hero-art__play-icon { display: block; }
html:not(.js) .hero-art__pause { display: none; }

/* Scene motion (the riders themselves move by SMIL, paused by hero.js). */
.banner-clouds { animation: hero-clouds 60s linear infinite; }
.banner-islands { animation: hero-islands 70s ease-in-out infinite; }
.water-current { animation: hero-water 3.5s linear infinite; }
.current-two { animation-duration: 4.8s; }
.editorial-burst { transform-box: fill-box; transform-origin: center; opacity: 0; animation: hero-burst 18s ease-out infinite; }
.burst-1 { animation-delay: 5s; }
.burst-2 { animation-delay: 10s; }
/* The SVG stretches (preserveAspectRatio="none"); hero.js sets the factor that
   keeps each rider at the sprite's true proportions. */
.rider-proportion { transform: scaleY(var(--rider-aspect, .65)); }
.hero-art.is-paused * { animation-play-state: paused !important; }
@keyframes hero-clouds { to { transform: translateX(-1600px); } }
@keyframes hero-islands { 50% { transform: translateX(100px); } }
@keyframes hero-water { to { stroke-dashoffset: -518; } }
@keyframes hero-burst {
    0%, 68%, 100% { opacity: 0; transform: scale(.2); }
    73% { opacity: .65; transform: scale(.65); }
    84% { opacity: 0; transform: scale(1.35); }
}

@media (prefers-reduced-motion: reduce) {
    .banner-clouds, .banner-islands, .water-current, .editorial-burst { animation: none; }
    .banner-kid, .editorial-burst, .hero-art__pause { display: none; }
}

@media (max-width: 820px) {
    .hero { min-height: 0; padding: 46px 0 52px; }
    .hero::before { display: none; }
    .hero h1 { font-size: clamp(36px, 8.5vw, 52px); max-width: 620px; line-height: 1.08; }
    .hero p { max-width: 540px; }
    /* Mobile: no scene at all, only two static glows reaching both edges. */
    .hero-art__scene, .hero-art__pause { display: none; }
    .hero-art {
        left: 50%; right: auto; width: 100vw; transform: translateX(-50%);
        background:
            radial-gradient(ellipse 220px 220px at 10% 24%, rgba(249, 190, 164, .34) 0%, rgba(249, 190, 164, .12) 46%, transparent 76%),
            radial-gradient(ellipse 250px 250px at 94% 78%, rgba(158, 221, 207, .38) 0%, rgba(158, 221, 207, .13) 46%, transparent 78%);
        -webkit-mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 85%, transparent 100%);
        mask-image: linear-gradient(180deg, transparent 0%, #000 12%, #000 85%, transparent 100%);
    }
}
@media (max-width: 480px) {
    .hero { padding: 35px 0 40px; }
    .hero__eyebrow { font-size: 9px; gap: 6px; letter-spacing: .07em; }
    .hero__star { font-size: 18px; }
    .hero h1 { font-size: 38px; margin-top: 9px; }
    .hero p { font-size: 16px; line-height: 1.65; }
}

/* ---------- Home sections ---------- */
.home-section { padding-top: 56px; }
/* Every page-1 post is already in the mosaic or Finds: drop the empty section. */
#latest:not(:has(.card)):not(:has(.pagination a)) { display: none; }
.mosaic-section { padding: 12px 0 24px; }
.mosaic-section .section-head h2 { font-size: 32px; margin: 8px 0 0; }
.section-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 20px; }
.section-head h2 { margin: 0; }
.section-head__link { font-size: 14px; font-weight: 800; white-space: nowrap; }
.section-head__link:hover { text-decoration: underline; }

@media (max-width: 620px) {
    .mosaic-section .section-head { align-items: flex-start; }
    .mosaic-section .section-head h2 { font-size: 27px; }
    .section-head__link { font-size: 12px; padding-top: 20px; }
}
@media (max-width: 560px) {
    .home-section { padding-top: 36px; }
    .section-head { align-items: flex-start; }
    .section-head h2 { font-size: 25px; }
}

/* ---------- Editorial mosaic ---------- */
.mosaic {
    display: grid; gap: 16px;
    grid-template-columns: 5fr 4fr 3fr;
    grid-template-rows: minmax(320px, auto) minmax(250px, auto);
    grid-template-areas: "lead welcome packing" "lead gifts links";
}
/* Missing tiles: re-flow instead of leaving holes. The no-lead rules double
   the class so they outrank the combinations above them. */
.mosaic:not(:has(.mosaic-packing)) { grid-template-areas: "lead welcome welcome" "lead gifts links"; }
.mosaic:not(:has(.mosaic-gifts)) { grid-template-areas: "lead welcome packing" "lead links links"; }
.mosaic:not(:has(.mosaic-links)) { grid-template-areas: "lead welcome packing" "lead gifts gifts"; }
.mosaic:not(:has(.mosaic-packing)):not(:has(.mosaic-gifts)) { grid-template-areas: "lead welcome welcome" "lead links links"; }
.mosaic:not(:has(.mosaic-gifts)):not(:has(.mosaic-links)) { grid-template-areas: "lead welcome packing" "lead welcome packing"; }
.mosaic:not(:has(.mosaic-packing)):not(:has(.mosaic-links)) { grid-template-areas: "lead welcome welcome" "lead gifts gifts"; }
.mosaic:not(:has(.mosaic-packing)):not(:has(.mosaic-gifts)):not(:has(.mosaic-links)) { grid-template-areas: "lead welcome welcome" "lead welcome welcome"; }
.mosaic.mosaic:not(:has(.mosaic-lead)) { grid-template-rows: auto; grid-template-areas: "welcome welcome links"; }
.mosaic.mosaic:not(:has(.mosaic-lead)):not(:has(.mosaic-links)) { grid-template-rows: auto; grid-template-areas: "welcome welcome welcome"; }

.tile { position: relative; overflow: hidden; min-width: 0; border-radius: var(--radius-tile); box-shadow: var(--shadow-tile); }
a.tile { color: inherit; }
a.tile:focus-visible { outline: 3px solid var(--link); outline-offset: 4px; }
.tile .eyebrow { font-size: 10px; letter-spacing: .09em; }
.tile h2, .tile h3 { overflow-wrap: anywhere; }

.mosaic-lead { grid-area: lead; background: var(--tile-lead); display: flex; flex-direction: column; justify-content: flex-end; min-height: 380px; }
.mosaic-lead > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mosaic-lead__caption { position: relative; width: 88%; background: var(--white); border-radius: 0 var(--radius-tile) 0 0; padding: 26px 26px 24px; }
.mosaic-lead--plain .mosaic-lead__caption { width: 100%; border-radius: 0; background: transparent; }
.mosaic-lead__caption h2 { font-size: 32px; margin: 12px 0; }
.mosaic-lead__caption p { font-size: 15px; line-height: 1.5; color: var(--muted); margin: 0 0 14px; }
.tile-arrow { position: absolute; right: 16px; top: 16px; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: rgba(255, 255, 255, .9); font-size: 23px; color: var(--link); }
.mosaic-lead:hover .tile-arrow { background: var(--white); }
.mosaic-lead:hover h2, .mosaic-gifts:hover h3, .mosaic-packing:hover h3 { text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 4px; }

.mosaic-welcome { grid-area: welcome; background: var(--tile-welcome); padding: 24px; }
.mosaic-welcome h2 { font-size: 28px; line-height: 1.1; margin: 0 0 16px; padding-top: 8px; }
.mosaic-welcome p { clear: both; margin: 0; padding-top: 2px; font-size: 14px; line-height: 1.5; color: #375C60; }
.porthole {
    float: right; width: 112px; height: 112px; margin: 0 0 14px 14px; padding: 5px;
    border: 5px solid #CFB57C; border-radius: 50%; background: #FBF7EA;
    box-shadow: 0 0 0 1px #AC8F53, inset 0 0 0 1px #D8C494;
}
.porthole img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: cover; object-position: 50% 28%; }

.mosaic-packing { grid-area: packing; background: var(--tile-packing); display: flex; flex-direction: column; padding: 25px 22px; }
.mosaic-packing h3 { font-size: 25px; line-height: 1.15; margin: 12px 0; }
.mosaic-packing__art { align-self: center; flex: 1; width: 110px; height: 110px; min-height: 65px; object-fit: contain; }
.tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; color: var(--link); }

.mosaic-gifts { grid-area: gifts; background: var(--tile-gifts); min-height: 250px; display: flex; flex-direction: column; justify-content: flex-end; }
.mosaic-gifts > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.mosaic-gifts__caption { position: relative; padding: 38px 64px 22px 26px; background: linear-gradient(0deg, rgba(255,255,255,.98), rgba(255,255,255,.9) 75%, rgba(255,255,255,0)); }
.mosaic-gifts--plain .mosaic-gifts__caption { background: none; }
.mosaic-gifts__caption h3 { font-size: 29px; line-height: 1.1; margin: 10px 0 0; }
.mosaic-gifts__arrow { position: absolute; right: 24px; bottom: 25px; font-size: 24px; color: var(--link); }

.mosaic-links { grid-area: links; background: var(--tile-links); border: 1px solid rgba(0, 95, 157, .07); padding: 24px 22px; }
.mosaic-links h3 { font-size: 24px; line-height: 1.15; margin: 0 0 16px; }
.mosaic-links a { display: flex; justify-content: space-between; gap: 8px; border-top: 1px solid var(--line-soft); padding: 11px 0; font-size: 13px; font-weight: 800; }
.mosaic-links a:last-child { padding-bottom: 0; }
.mosaic-links a:hover { text-decoration: underline; }

@media (max-width: 1050px) {
    .mosaic {
        grid-template-columns: 1.2fr 1fr;
        grid-template-rows: minmax(340px, auto) minmax(220px, auto) auto;
        grid-template-areas: "lead welcome" "lead packing" "gifts links";
    }
    .mosaic:not(:has(.mosaic-packing)) { grid-template-areas: "lead welcome" "lead gifts" "links links"; }
    .mosaic:not(:has(.mosaic-gifts)) { grid-template-areas: "lead welcome" "lead packing" "links links"; }
    .mosaic:not(:has(.mosaic-links)) { grid-template-areas: "lead welcome" "lead packing" "gifts gifts"; }
    .mosaic:not(:has(.mosaic-packing)):not(:has(.mosaic-gifts)) { grid-template-rows: minmax(340px, auto) minmax(220px, auto); grid-template-areas: "lead welcome" "lead links"; }
    .mosaic:not(:has(.mosaic-gifts)):not(:has(.mosaic-links)) { grid-template-rows: minmax(340px, auto) minmax(220px, auto); grid-template-areas: "lead welcome" "lead packing"; }
    .mosaic:not(:has(.mosaic-packing)):not(:has(.mosaic-links)) { grid-template-rows: minmax(340px, auto) minmax(220px, auto); grid-template-areas: "lead welcome" "lead gifts"; }
    .mosaic:not(:has(.mosaic-packing)):not(:has(.mosaic-gifts)):not(:has(.mosaic-links)) { grid-template-rows: minmax(340px, auto); grid-template-areas: "lead welcome"; }
    .mosaic.mosaic:not(:has(.mosaic-lead)) { grid-template-rows: auto; grid-template-areas: "welcome links"; }
    .mosaic.mosaic:not(:has(.mosaic-lead)):not(:has(.mosaic-links)) { grid-template-rows: auto; grid-template-areas: "welcome welcome"; }
    .mosaic-packing { flex-direction: row; flex-wrap: wrap; align-items: center; padding: 22px; }
    .mosaic-packing > div:first-child { flex: 1; min-width: 0; }
    .mosaic-packing__art { flex: none; width: 85px; height: 85px; min-height: 0; margin-left: auto; }
    .tile-foot { width: 100%; }
    .mosaic-gifts { min-height: 230px; }
    .mosaic-lead__caption h2 { font-size: 29px; }
    .porthole { width: 96px; height: 96px; margin-left: 10px; }
    .mosaic-welcome h2 { font-size: 27px; }
}
@media (max-width: 620px) {
    .mosaic { display: flex; flex-direction: column; }
    .tile { border-radius: 24px; }
    .mosaic-lead { min-height: 420px; }
    .mosaic-lead__caption { width: 90%; padding: 23px; border-top-right-radius: 25px; }
    .mosaic-lead__caption h2 { font-size: 30px; }
    .mosaic-welcome { padding: 26px; }
    .mosaic-welcome h2 { font-size: 30px; padding-top: 10px; }
    .mosaic-welcome p { font-size: 15px; line-height: 1.6; padding-top: 8px; }
    .porthole { width: 118px; height: 118px; margin-left: 18px; }
    .mosaic-packing { min-height: 190px; }
    .mosaic-packing__art { width: 100px; height: 100px; }
    .mosaic-gifts { min-height: 260px; }
    .mosaic-links { padding: 26px 24px; }
    .mosaic-links h3 { margin-bottom: 20px; }
    .mosaic-links a { padding: 14px 0; font-size: 15px; }
}

/* ---------- Topic links ---------- */
.topics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.topic {
    display: flex; align-items: center; gap: 12px; padding: 18px;
    background: var(--white); border-radius: var(--radius-card);
    box-shadow: 0 6px 22px rgba(18, 71, 91, .07);
    font-weight: 800; color: var(--link);
}
.topic:hover { text-decoration: underline; }
.topic--first-cruise { order: 1; }
.topic--fish-extender-basics { order: 2; }
.topic--gift-inspiration { order: 3; }
.topic--packing-guides { order: 4; }
.topic__icon { flex: 0 0 48px; width: 48px; height: 48px; object-fit: contain; transition: transform .2s; }
.topic__arrow { font-weight: 400; margin-left: 4px; }
.topic__medallion {
    display: flex; align-items: center; justify-content: center; flex: 0 0 48px;
    width: 48px; height: 48px; border-radius: 50%;
    background: #143C65; border: 2px solid #C5D3DD;
    box-shadow: inset 0 0 0 2px #143C65, inset 0 0 0 3px rgba(221, 231, 239, .65);
}
.topic__medallion img { width: 39px; height: 39px; filter: grayscale(1) contrast(.7) brightness(1.45); }
.topic:hover .topic__icon, .topic:hover .topic__medallion { transform: translateY(-2px); }

@media (max-width: 1000px) { .topics { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 820px) {
    .topic { padding: 16px 12px; gap: 9px; font-size: 14px; }
    .topic__icon, .topic__medallion { flex-basis: 40px; width: 40px; height: 40px; }
    .topic__medallion img { width: 33px; height: 33px; }
}
@media (max-width: 560px) { .topics { gap: 10px; } }

/* ---------- Article cards ---------- */
.card-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 22px; }
.card {
    display: flex; flex-direction: column; overflow: hidden;
    background: var(--white); border: 1px solid rgba(22, 76, 80, .08);
    border-radius: var(--radius-card); box-shadow: var(--shadow-card);
    color: inherit; transition: transform .2s, box-shadow .2s;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card-hover); }
.card:hover .card__title { text-decoration: underline; text-underline-offset: 3px; }
.card__image { display: block; width: 100%; height: 190px; object-fit: cover; background: var(--tile-lead); }
.card__body { display: flex; flex-direction: column; flex: 1; padding: 24px; }
.card__title { margin: 10px 0; overflow-wrap: anywhere; }
.card__excerpt { margin: 0 0 8px; font-size: 14px; color: var(--muted); }
.card .meta { margin-top: auto; padding-top: 8px; }
.card--plain .card__body { border-top: 6px solid var(--tile-welcome); }

@media (max-width: 820px) { .card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) {
    .card-grid { grid-template-columns: 1fr; }
    .card__image { height: 200px; }
    .card__body { padding: 20px; }
}

.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-top: 32px; font-weight: 800; }
.pagination__count { color: var(--muted); font-size: 13px; }
.pagination__link:hover { text-decoration: underline; }

/* ---------- App invite ---------- */
.app-invite {
    display: flex; justify-content: space-between; align-items: center; gap: 24px;
    margin: 56px 0; padding: 32px; border-radius: 26px;
    background: var(--blue); color: var(--white);
}
.app-invite h2 { color: var(--white); font-size: 27px; margin: 0; }
.app-invite p { margin: 8px 0 0; }
@media (max-width: 560px) {
    .app-invite { display: block; padding: 25px; margin: 36px 0; }
    .app-invite .button { margin-top: 18px; white-space: normal; }
}

/* ---------- Archives ---------- */
.archive-head { padding: 48px 0 28px; max-width: 760px; }
.archive-head h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); margin: 8px 0 12px; }
.archive-head__desc { margin: 0 0 8px; color: var(--muted); font-size: 17px; }
.archive-head--author { display: flex; gap: 24px; align-items: center; }
.archive-head__avatar { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.archive-grid { padding-bottom: 24px; }

.error-page { padding: 96px 0; text-align: center; max-width: 620px; margin: 0 auto; }
.error-page h1 { font-size: clamp(2rem, 4.2vw, 2.9rem); }
.error-page p { color: var(--muted); margin-bottom: 28px; }

/* ---------- Footer ---------- */
.site-footer { margin-top: 56px; padding: 40px 0; background: var(--blue); color: var(--white); }
.home-template .site-footer { margin-top: 0; }
.site-footer a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.site-footer .wordmark, .site-footer .wordmark__coral { color: var(--white); }
.site-footer__top { display: flex; justify-content: space-between; gap: 30px; }
.site-footer__tagline { max-width: 520px; font-size: 13px; }
.site-footer__links { display: flex; flex-wrap: wrap; align-content: start; gap: 12px 20px; font-size: 13px; }
.site-footer__fine { margin: 0; font-size: 12px; }
.site-footer__fine:first-of-type { border-top: 1px solid rgba(255, 255, 255, .28); margin-top: 28px; padding-top: 20px; }
.site-footer__top + .site-footer__fine + .site-footer__fine { margin-top: 12px; opacity: .9; }
@media (max-width: 560px) {
    .site-footer__top { display: block; }
    .site-footer__links { margin-top: 24px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
