/*!
Theme Name: Geordie Rant
Theme URI: https://littlenerdwebdesign.co.uk/
Author: Louise Foster
Author URI: https://littlenerdwebdesign.co.uk/
Description: Custom theme for Geordie Rant. Built on LFWD.
Version: 1.0.0
Tested up to: 6.8
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: LICENSE
Text Domain: LFWD
*/

/* ============================================================
   GEORDIE RANT
   Colours: #191919 background · #f3f3f3 text · #70bad5 blue
   Fonts: Metamorphous (headings) · Oxygen (body) – self-hosted
   ============================================================ */

@font-face{font-family:'Metamorphous';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/metamorphous-regular.woff) format('woff');}
@font-face{font-family:'Oxygen';font-style:normal;font-weight:400;font-display:swap;src:url(fonts/oxygen-regular.woff) format('woff');}
@font-face{font-family:'Oxygen';font-style:normal;font-weight:700;font-display:swap;src:url(fonts/oxygen-bold.woff) format('woff');}


:root {
  --bg: #191919;
  --bg-deep: #141414;
  --card: #222222;
  --text: #f3f3f3;
  --muted: #c4c4c4;
  --soft: #a8a8a8;
  --accent: #70bad5;
  --line: #3a3a3a;
  --font-head: 'Metamorphous', Georgia, serif;
  --font-body: 'Oxygen', system-ui, sans-serif;
  --max: 1280px;
  --gutter: 24px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; box-sizing: border-box; scroll-behavior: smooth; }

/* People who have turned on "reduce motion" get the instant jump instead */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 18px;
  line-height: 1.6;
  overflow-x: hidden;
}

/* faint dot texture so the dark isn't flat */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.05;
  background-image: radial-gradient(#fff 1px, transparent 1px);
  background-size: 4px 4px;
  z-index: -1;
}

h1, h2, h3, h4 { font-family: var(--font-head); font-weight: 400; line-height: 1.1; margin: 0; }
p { margin: 0 0 1em; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }

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

.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); position: relative; }

.screen-reader-text {
  position: absolute !important; 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: -9999px; top: 0; z-index: 100;
  background: var(--accent); color: var(--bg); padding: 12px 18px; font-weight: 700;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ---------- Shared bits ---------- */

.chip {
  display: inline-block; font-weight: 700; font-size: 13px; letter-spacing: 0.16em;
  text-transform: uppercase; padding: 5px 12px; background: var(--accent); color: var(--bg);
}
a.chip:hover { background: var(--text); }

.date { color: var(--soft); font-size: 15px; }

.btn {
  display: inline-block; font-family: var(--font-head); font-size: 19px;
  background: var(--text); color: var(--bg); padding: 14px 28px;
  border-radius: 40px 34px 38px 30px; transition: transform 0.15s, background 0.15s;
}
.btn::after { content: ' →'; }
.btn:hover { background: var(--accent); transform: rotate(-2deg) scale(1.03); }

.btn--dashed {
  background: transparent; color: var(--text); border: 2px dashed var(--text);
  border-radius: 0; transform: rotate(-3deg);
}
.btn--dashed:hover { background: var(--accent); color: var(--bg); border-color: var(--accent); }

.read-more {
  font-family: var(--font-head); color: var(--accent); font-size: 18px;
  border-bottom: 2px solid var(--accent); padding-bottom: 1px;
}
.read-more:hover { color: var(--text); border-color: var(--text); }

/* Grump level dots */
.grump {
  display: flex; align-items: center; gap: 6px; font-size: 13px;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--soft);
}
.grump__label { margin-right: 6px; }
.grump__dot { width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--accent); }
.grump__dot.is-on { background: var(--accent); }

/* Magpie stripes */
.stripes { height: 22px; background: repeating-linear-gradient(90deg, var(--text) 0 40px, var(--bg) 40px 80px); }

/* ---------- HEADER ---------- */

.site-header .wrap { display: flex; align-items: center; column-gap: 24px; row-gap: 44px; padding-top: 26px; padding-bottom: 26px; flex-wrap: wrap; }

.wordmark { font-family: var(--font-head); font-size: 30px; letter-spacing: 0.02em; white-space: nowrap; }
.wordmark span { color: var(--accent); }

/* Category tabs sit on their own line under the site title and search bar */
.site-header .tabs { order: 3; width: 100%; margin-left: 0; margin-bottom: 24px; }
.site-header .tabs ul { justify-content: center; }
.tabs ul { display: flex; flex-wrap: wrap; list-style: none; margin: 0; padding: 0; }
.tabs a {
  display: block;
  font-family: var(--font-head); font-size: 19px; padding: 10px 20px;
  border: 2px solid var(--text); margin-left: -2px; background: var(--bg);
  transition: background 0.15s, color 0.15s;
}
.tabs li:nth-child(4n + 1) a { transform: rotate(-2deg); }
.tabs li:nth-child(4n + 2) a { transform: rotate(1.5deg) translateY(3px); }
.tabs li:nth-child(4n + 3) a { transform: rotate(-1deg); }
.tabs li:nth-child(4n + 4) a { transform: rotate(2deg) translateY(2px); }
.tabs a:hover,
.tabs a[aria-current='page'],
.tabs .current-menu-item > a,
.tabs .current-menu-parent > a,
.tabs .current-post-ancestor > a,
.tabs .current-category-ancestor > a { background: var(--accent); color: var(--bg); border-color: var(--accent); position: relative; z-index: 1; }

.search-bubble {
  margin-left: auto; position: relative; display: flex; align-items: center;
  background: var(--text); border-radius: 30px; width: 330px; max-width: 100%;
}
.search-bubble::after {
  content: ''; position: absolute; left: 34px; bottom: -12px;
  border: 12px solid transparent; border-top-color: var(--text); border-bottom: 0;
  transform: skewX(-25deg);
}
.search-bubble input {
  flex: 1; min-width: 0; border: 0; background: transparent; color: var(--bg);
  font: inherit; font-size: 16px; padding: 12px 0 12px 22px;
}
.search-bubble input::placeholder { color: #555; }
.search-bubble input:focus { outline: none; }
.search-bubble:focus-within { box-shadow: 0 0 0 3px var(--accent); }
.search-bubble button {
  border: 0; background: transparent; color: var(--bg); padding: 10px 18px 10px 10px;
  cursor: pointer; display: grid; place-items: center;
}

/* ---------- HERO ---------- */

.hero { display: grid; grid-template-columns: 520px 1fr; align-items: center; margin-top: 10px; min-height: 560px; }
.hero__magpie { width: 560px; max-width: none; transform: rotate(-6deg) translateX(-30px); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); position: relative; z-index: 2; }

.bubble {
  position: relative; background: var(--text); color: var(--bg);
  border-radius: 46% 54% 50% 50% / 55% 48% 52% 45%;
  padding: 78px 96px 84px 110px; transform: rotate(1.5deg); margin-left: -50px;
}
.bubble::before {
  content: ''; position: absolute; left: -60px; top: 52%;
  width: 150px; height: 70px; background: var(--text);
  clip-path: polygon(0 70%, 100% 0, 100% 100%); z-index: -1;
}
.bubble h1 { font-size: clamp(36px, 4.4vw, 62px); line-height: 1.05; letter-spacing: -0.01em; }
.bubble h1 em {
  font-style: normal; background: var(--bg); color: var(--accent);
  padding: 0 12px; display: inline-block; transform: rotate(-2deg);
}
.bubble p, .page-head .bubble p { margin: 26px 0 0; font-size: 19px; max-width: 560px; color: #2b2b2b; }

/* ---------- TICKER ---------- */

.ticker-holder { overflow: hidden; padding: 24px 0; }
.ticker {
  background: var(--accent); color: var(--bg); transform: rotate(-1.6deg); margin: 0 -40px;
  padding: 14px 60px; border-top: 4px solid var(--bg); border-bottom: 4px solid var(--bg);
  box-shadow: 0 0 0 4px var(--text); overflow: hidden;
  display: flex; align-items: center; gap: 10px 0; flex-wrap: nowrap;
}
.ticker h2 {
  font-family: var(--font-body); font-weight: 700; font-size: 15px; letter-spacing: 0.14em;
  text-transform: uppercase; background: var(--bg); color: var(--accent); padding: 6px 12px; margin-right: 26px;
}
.ticker h2 { flex: none; position: relative; z-index: 1; }

/* Scrolling strip: the list is shown twice and slides left forever, so it never cuts off */
.ticker__viewport { flex: 1; min-width: 0; overflow: hidden; }
.ticker__track { display: flex; width: max-content; animation: gr-ticker var(--ticker-duration, 40s) linear infinite; }
.ticker:hover .ticker__track,
.ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: nowrap; flex: none; }
.ticker li { font-family: var(--font-head); font-size: 22px; white-space: nowrap; }
.ticker li::after { content: '·'; margin: 0 22px; }
.ticker li a:hover, .ticker li a:focus-visible { text-decoration: underline; text-underline-offset: 4px; }
@keyframes gr-ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- FEATURED ---------- */

.featured { display: grid; grid-template-columns: repeat(12, 1fr); margin-top: 100px; position: relative; }
.featured__img {
  grid-column: 1 / 9; grid-row: 1; border: 6px solid var(--text); transform: rotate(-1.2deg);
  overflow: hidden; aspect-ratio: 16 / 10;
}
.featured__img img { width: 100%; height: 100%; object-fit: cover; }
.stamp {
  position: absolute; left: -26px; top: -40px; z-index: 3; width: 170px; height: 170px;
  border-radius: 50%; background: var(--bg); border: 4px solid var(--accent); color: var(--accent);
  display: grid; place-content: center; text-align: center; font-family: var(--font-head);
  font-size: 24px; line-height: 1.05; transform: rotate(-14deg);
}
.stamp small { display: block; font-family: var(--font-body); font-size: 12px; letter-spacing: 0.2em; color: var(--text); margin-top: 6px; }
.featured__text {
  grid-column: 8 / 13; grid-row: 1; align-self: center; margin-top: 90px; z-index: 2;
  background: var(--bg); border: 3px solid var(--accent); padding: 44px 46px;
  transform: rotate(0.8deg); box-shadow: 16px 16px 0 var(--accent);
}
.featured__text h2 { font-size: clamp(30px, 3.2vw, 46px); margin: 16px 0 18px; }
.featured__text h2 a:hover { color: var(--accent); }
.featured__text p { color: var(--muted); margin-bottom: 26px; }
.featured__text .grump { margin-top: 22px; }

/* Homepage latest posts section */
.home-latest { margin-top: 150px; }

/* ---------- CATEGORY RAIL (left column) ---------- */

.with-rail { display: grid; grid-template-columns: 330px 1fr; gap: 50px; align-items: start; }

.rail h2 { font-size: 24px; color: var(--accent); margin-bottom: 22px; }
.rail ul { list-style: none; margin: 0; padding: 0; }
.rail a {
  display: flex; align-items: baseline; justify-content: space-between;
  font-family: var(--font-head); font-size: 64px; line-height: 1.08;
  color: transparent; -webkit-text-stroke: 1.5px var(--text);
  border-bottom: 1px solid var(--line); padding: 6px 0;
  transition: color 0.2s, -webkit-text-stroke-color 0.2s;
}
/* Hover, keyboard focus and current category = solid white */
.rail a:hover,
.rail a:focus-visible,
.rail a.is-current { color: var(--text); -webkit-text-stroke-color: var(--text); }
.rail a small {
  font-family: var(--font-body); font-size: 15px; font-weight: 700;
  -webkit-text-stroke: 0; color: var(--accent);
}
.rail p { color: var(--muted); font-size: 16px; margin-top: 24px; }

/* Fallback for browsers without outline text */
@supports not (-webkit-text-stroke: 1px #fff) {
  .rail a { color: var(--soft); }
  .rail a:hover, .rail a:focus-visible, .rail a.is-current { color: var(--text); }
}

/* ---------- POST CARDS ---------- */

.card {
  position: relative; background: var(--card); border: 2px solid var(--line);
  padding: 16px 16px 24px; transition: transform 0.2s, border-color 0.2s;
}
.card:hover { border-color: var(--accent); }
.card__img { aspect-ratio: 16 / 9; overflow: hidden; border: 2px solid #111; margin-bottom: 18px; }
.card__img img { width: 100%; height: 100%; object-fit: cover; }
.card__tape {
  position: absolute; top: -16px; left: 50%; width: 120px; height: 32px; margin-left: -60px;
  background: rgba(243, 243, 243, 0.92); color: var(--bg); font-weight: 700; font-size: 12px;
  letter-spacing: 0.16em; text-transform: uppercase; display: grid; place-items: center;
  transform: rotate(-3deg); z-index: 2;
}
.card__tape:hover { background: var(--accent); }
.card h2, .card h3 { font-size: 27px; margin: 0 6px 10px; }
.card h2 a:hover, .card h3 a:hover { color: var(--accent); }
.card p { margin: 0 6px 16px; color: var(--muted); font-size: 16px; }
.card__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0 6px; }
.card__row .date { font-size: 14px; }
.card .grump { margin: 14px 6px 0; }

/* Blue card */
.card--blue { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.card--blue p, .card--blue .date, .card--blue .grump { color: var(--bg); }
.card--blue h2 a:hover, .card--blue h3 a:hover { color: var(--text); }
.card--blue .read-more { color: var(--bg); border-color: var(--bg); }
.card--blue .read-more:hover { color: var(--text); border-color: var(--text); }
.card--blue .grump__dot { border-color: var(--bg); }
.card--blue .grump__dot.is-on { background: var(--bg); }
.card--blue .card__tape { background: var(--bg); color: var(--accent); }

/* Wide card (image left, text right) */
.card--wide { display: grid; grid-template-columns: 330px 1fr; gap: 26px; align-items: center; padding: 16px; }
.card--wide .card__img { margin: 0; }
.card--wide h2, .card--wide h3 { margin: 14px 0 8px; }
.card--wide p, .card--wide .card__row { margin-left: 0; margin-right: 0; }
.card--wide .card__row .grump { margin: 0; }

/* "All rants" page: "Today's rant" sized to fit across the two post columns */
.with-rail .featured { margin: 40px 0 110px; }
.with-rail .featured__img { grid-column: 1 / 9; }
.with-rail .featured__text { grid-column: 7 / 13; margin-top: 70px; padding: 32px 34px; box-shadow: 12px 12px 0 var(--accent); }
.with-rail .featured__text h2 { font-size: clamp(26px, 2.4vw, 36px); margin: 14px 0 14px; }
.with-rail .featured__text p { font-size: 16px; margin-bottom: 20px; }
.with-rail .featured .stamp { width: 130px; height: 130px; font-size: 19px; left: -20px; top: -36px; }

/* Homepage pile – scattered layout */
.pile { display: grid; grid-template-columns: 1fr 1fr; gap: 50px 36px; align-items: start; padding-top: 16px; }
.pile > :nth-child(1) { transform: rotate(-1.5deg); }
.pile > :nth-child(2) { transform: rotate(1.2deg); margin-top: 60px; }
.pile > :nth-child(3) { transform: rotate(1deg); margin: 0 10px 0 20px; }
.pile > :nth-child(4) { transform: rotate(-1deg); margin-top: 30px; }
.pile > :nth-child(5) { transform: rotate(-0.6deg); grid-column: 1 / -1; }
.pile__more { grid-column: 1 / -1; justify-self: end; margin: 10px 20px 0 0; }

/* Listing pages – tidier, still tilted */
.card-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 50px 36px; align-items: start; padding-top: 16px; }
.card-grid > :nth-child(4n + 1) { transform: rotate(-1.2deg); }
.card-grid > :nth-child(4n + 2) { transform: rotate(1deg); margin-top: 40px; }
.card-grid > :nth-child(4n + 3) { transform: rotate(0.8deg); }
.card-grid > :nth-child(4n + 4) { transform: rotate(-0.8deg); margin-top: 40px; }

.pile > .card:hover, .card-grid > .card:hover { transform: rotate(0deg) translateY(-4px); }

/* meta row (category chip + date) */
.card__meta { margin: 0; display: flex; align-items: center; gap: 8px 12px; flex-wrap: wrap; }

/* ---------- PAGE HEAD (category / all / search / 404) ---------- */

.page-head { padding: 60px 0 70px; position: relative; }
.page-head__kicker { transform: rotate(-3deg); display: inline-block; margin-bottom: 18px; }
.page-head h1 { font-size: clamp(44px, 10vw, 140px); line-height: 0.95; overflow-wrap: anywhere; }
.page-head h1 span { color: var(--accent); }
.page-head p { color: var(--muted); font-size: 20px; max-width: 680px; margin-top: 24px; }

/* ---------- PAGINATION ---------- */

.pagination { display: flex; gap: 10px; align-items: center; justify-content: center; margin-top: 70px; flex-wrap: wrap; }
.pagination > a, .pagination > span {
  font-family: var(--font-head); font-size: 20px; min-width: 50px; height: 50px; padding: 0 14px;
  display: grid; place-items: center; border: 2px solid var(--text);
}
.pagination > a:hover { background: var(--accent); border-color: var(--accent); color: var(--bg); }
.pagination [aria-current='page'] { background: var(--text); color: var(--bg); }
.pagination .is-disabled { opacity: 0.35; }

/* ---------- ABOUT ---------- */

.about { display: grid; grid-template-columns: 400px 1fr; gap: 70px; align-items: center; margin-top: 180px; }
.polaroid { background: var(--text); padding: 16px 16px 20px; transform: rotate(-5deg); color: var(--bg); width: 340px; margin-left: 40px; }
.polaroid__ph { aspect-ratio: 1; background: #2c2c2c; display: grid; place-items: center; color: var(--muted); font-size: 15px; text-align: center; overflow: hidden; }
.polaroid__ph img { width: 100%; height: 100%; object-fit: cover; }
.polaroid figcaption { text-align: center; font-family: var(--font-head); font-size: 22px; padding-top: 18px; }
.about h2 { font-size: clamp(40px, 4.4vw, 58px); margin-bottom: 22px; }
.about h2 span { color: var(--accent); }
.about__text > p { color: var(--muted); font-size: 19px; max-width: 700px; }
.facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 10px 0 0; }
.fact { border: 2px solid var(--line); padding: 18px 20px; margin: 0; }
.fact dt { font-size: 12px; font-weight: 700; letter-spacing: 0.18em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }
.fact dd { margin: 0; font-family: var(--font-head); font-size: 21px; }
.fact:nth-child(2) { transform: rotate(1.5deg); border-color: var(--accent); }

.socials { display: flex; gap: 12px; margin-top: 28px; align-items: center; flex-wrap: wrap; }
.socials a { width: 48px; height: 48px; border-radius: 50%; background: var(--text); color: var(--bg); display: grid; place-items: center; transition: background 0.15s, transform 0.15s; }
.socials a:hover { background: var(--accent); transform: rotate(-10deg); }
.socials__note { color: var(--soft); font-size: 15px; margin-left: 8px; }

/* ---------- SINGLE POST ---------- */

.post-head { padding: 50px 0 40px; display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.post-head__meta { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.post-head h1 { font-size: clamp(40px, 5vw, 72px); margin: 22px 0 24px; }
.post-head__img { border: 6px solid var(--text); transform: rotate(1.5deg); box-shadow: -16px 16px 0 var(--accent); aspect-ratio: 16 / 10; overflow: hidden; }
.post-head__img img { width: 100%; height: 100%; object-fit: cover; }

.prose { max-width: 720px; margin: 40px auto 0; font-size: 19px; line-height: 1.75; }
.prose h2 { font-size: 36px; margin: 2em 0 0.6em; }
.prose h3 { font-size: 28px; margin: 1.8em 0 0.5em; color: var(--accent); }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.prose a:hover { color: var(--text); }
.prose blockquote {
  margin: 2em 0; padding: 26px 30px; background: var(--text); color: var(--bg);
  font-family: var(--font-head); font-size: 24px; line-height: 1.35; transform: rotate(-1deg);
}
.prose blockquote p { margin: 0; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: 0.4em; }
.prose li::marker { color: var(--accent); }
.prose img { margin: 2em 0; border: 4px solid var(--text); }
.prose hr { border: 0; height: 8px; margin: 3em 0; background: repeating-linear-gradient(90deg, var(--text) 0 20px, transparent 20px 40px); }
.prose strong { color: #fff; }

.post-end { max-width: 720px; margin: 60px auto 0; padding-top: 30px; border-top: 2px dashed var(--line); display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.post-end p { margin: 0; font-family: var(--font-head); font-size: 24px; }

.related { margin-top: 120px; }
.related > h2 { font-size: clamp(34px, 4vw, 52px); margin-bottom: 40px; }
.related > h2 span { color: var(--accent); }
.card-grid--3 { grid-template-columns: repeat(3, 1fr); }

/* ---------- SEARCH ---------- */

.search-page-form { margin: 30px 0 0; width: 560px; max-width: 100%; }
.search-page-form input { font-size: 20px; padding: 16px 0 16px 26px; }
.search-status { font-family: var(--font-head); font-size: 24px; color: var(--accent); margin-bottom: 30px; }
.search-results .card mark { background: var(--accent); color: var(--bg); padding: 0 3px; }

/* No results / 404 */
.nowt { display: grid; grid-template-columns: 340px 1fr; gap: 50px; align-items: center; }
.nowt__magpie { width: 340px; transform: rotate(-8deg); filter: drop-shadow(0 18px 30px rgba(0, 0, 0, 0.55)); }
.nowt .bubble { margin-left: 0; padding: 50px 60px 56px; border-radius: 60px 80px 70px 56px; }
.nowt .bubble h2, .nowt .bubble h1 { font-size: clamp(34px, 4vw, 54px); }
.try-these { margin-top: 70px; }
.try-these h2 { font-size: 30px; color: var(--accent); margin-bottom: 22px; }
.try-these .tabs { margin-left: 0; }
.try-these .tabs li { margin-bottom: 10px; }

.big-404 {
  font-family: var(--font-head); font-size: clamp(120px, 22vw, 300px); line-height: 0.8;
  color: transparent; -webkit-text-stroke: 2px var(--accent); transform: rotate(-4deg);
  display: block; margin-bottom: 30px;
}

.big-404 + .nowt__magpie { margin-top: -110px; position: relative; }
.bubble .search-bubble { background: var(--bg); margin: 26px 0 0; }
.bubble .search-bubble::after { display: none; }
.bubble .search-bubble input { color: var(--text); }
.bubble .search-bubble input::placeholder { color: var(--soft); }
.bubble .search-bubble button { color: var(--text); }

/* ---------- FOOTER ---------- */

.site-footer { margin-top: 140px; background: var(--bg-deep); }
.foot { display: flex; align-items: center; justify-content: space-between; gap: 40px; padding: 70px 0 50px; }
.foot__heading { font-family: var(--font-head); margin: 0; font-size: clamp(56px, 7vw, 96px); line-height: 0.95; }
.foot__heading span { color: var(--accent); display: block; font-size: 0.58em; margin-top: 10px; }
.foot__links { display: flex; gap: 28px; flex-wrap: wrap; font-family: var(--font-head); font-size: 22px; margin-top: 34px; list-style: none; padding: 0; }
.foot__links a:hover { color: var(--accent); }
.foot__magpie { width: 230px; transform: rotate(8deg); }
.copy { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding: 22px 0 36px; color: var(--soft); font-size: 15px; }
.copy a:hover { color: var(--accent); }

/* ============================================================
   WORDPRESS EXTRAS (editor content, menus, images)
   ============================================================ */

/* No featured image: show the magpie instead */
.card__img img.is-placeholder,
.featured__img img.is-placeholder { object-fit: contain; padding: 8% 0; background: var(--bg-deep); }

/* Plain pages (privacy etc.) */
.page-head--page { padding-bottom: 20px; }
.prose--page { margin-top: 0; }

/* Block editor content inside posts and pages */
.prose > *:first-child { margin-top: 0; }
.prose figure { margin: 2em 0; }
.prose figure img { margin: 0; }
.prose .wp-block-image img,
.prose .wp-caption img { margin: 0; }
.prose figcaption,
.prose .wp-caption-text,
.prose .wp-element-caption { color: var(--soft); font-size: 15px; text-align: center; margin-top: 10px; }
.prose blockquote cite,
.prose .wp-block-quote cite { display: block; margin-top: 12px; font-family: var(--font-body); font-size: 15px; font-style: normal; color: #444; }
.prose .wp-block-pullquote { border: 0; padding: 0; }
.prose iframe,
.prose embed,
.prose object,
.prose video { max-width: 100%; }
.prose .wp-block-embed__wrapper iframe { width: 100%; }
.prose table { width: 100%; border-collapse: collapse; margin: 2em 0; font-size: 16px; }
.prose th,
.prose td { border: 1px solid var(--line); padding: 10px 14px; text-align: left; }
.prose th { background: var(--card); color: var(--accent); }
.prose code { background: var(--card); padding: 2px 6px; font-size: 0.9em; }
.prose pre { background: var(--bg-deep); border: 2px solid var(--line); padding: 20px; overflow: auto; font-size: 15px; }
.prose pre code { background: none; padding: 0; }
.prose .wp-block-separator { border: 0; }
.prose .wp-block-button__link { font-family: var(--font-head); background: var(--text); color: var(--bg); text-decoration: none; padding: 14px 28px; border-radius: 40px 34px 38px 30px; }
.prose .wp-block-button__link:hover { background: var(--accent); color: var(--bg); }
.prose .wp-block-gallery figure { margin: 0; }
.prose .wp-block-gallery img { border-width: 2px; }

.page-links { clear: both; margin: 2em 0 0; font-family: var(--font-head); }
.page-links a,
.page-links .post-page-numbers { display: inline-block; min-width: 40px; text-align: center; padding: 4px 10px; border: 2px solid var(--text); margin-left: 6px; text-decoration: none; }
.page-links .current { background: var(--text); color: var(--bg); }

/* Alignment classes */
.alignleft { float: left; margin: 0.4em 1.5em 1em 0; }
.alignright { float: right; margin: 0.4em 0 1em 1.5em; }
.aligncenter { clear: both; display: block; margin-left: auto; margin-right: auto; }
.wp-caption { max-width: 100%; }
.gallery { margin-bottom: 1.5em; display: grid; grid-gap: 1.5em; }
.gallery-item { display: inline-block; text-align: center; width: 100%; }
.gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.gallery-columns-3 { grid-template-columns: repeat(3, 1fr); }
.gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.gallery-caption { display: block; }

/* Header/footer menus from Appearance > Menus */
.tabs .sub-menu { display: none; }
.foot__links li { margin: 0; }

.sticky, .bypostauthor { display: block; }
.edit-link { display: none; }

/* Editor colour palette */
.has-rant-black-color { color: #191919 !important; } .has-rant-black-background-color { background-color: #191919 !important; }
.has-rant-card-color { color: #222222 !important; } .has-rant-card-background-color { background-color: #222222 !important; }
.has-rant-white-color { color: #f3f3f3 !important; } .has-rant-white-background-color { background-color: #f3f3f3 !important; }
.has-rant-blue-color { color: #70bad5 !important; } .has-rant-blue-background-color { background-color: #70bad5 !important; }
.has-rant-grey-color { color: #c4c4c4 !important; } .has-rant-grey-background-color { background-color: #c4c4c4 !important; }

/* ============================================================
   RESPONSIVE
   ============================================================ */

@media (max-width: 1180px) {
  .hero { grid-template-columns: 400px 1fr; }
  .hero__magpie { width: 440px; }
  .bubble { padding: 60px 70px 66px 90px; }
  .with-rail { grid-template-columns: 260px 1fr; gap: 36px; }
  .rail a { font-size: 50px; }
  .search-bubble { width: 260px; }
  .tabs a { padding: 9px 14px; font-size: 17px; }
  .about { grid-template-columns: 340px 1fr; gap: 50px; }
  .polaroid { width: 300px; margin-left: 10px; }
}

@media (max-width: 960px) {
  .tabs { margin-left: 0; order: 3; width: 100%; }
  .search-bubble { margin-left: auto; }

  .hero { grid-template-columns: 1fr; text-align: left; min-height: 0; }
  .hero__magpie { width: 300px; margin: 0 auto; transform: rotate(-6deg); }
  .bubble { margin: 10px 0 0; transform: rotate(1deg); border-radius: 40px 60px 50px 46px; }
  .bubble::before { left: 46%; top: -50px; width: 70px; height: 70px; clip-path: polygon(30% 0, 100% 100%, 0 100%); }

  .featured { display: block; margin-top: 70px; }
  .with-rail .featured { margin: 50px 0 70px; }
  .with-rail .featured__text { margin: -40px 12px 0; }
  .featured__img { transform: rotate(-1deg); }
  .featured__text { margin: -40px 12px 0; position: relative; }
  .stamp { width: 130px; height: 130px; font-size: 19px; left: -10px; top: -36px; }

  .with-rail { grid-template-columns: 1fr; }
  .rail a { font-size: 44px; }
  .rail ul { display: flex; flex-wrap: wrap; gap: 0 26px; }
  .rail a { border-bottom: 0; gap: 8px; }

  .about { grid-template-columns: 1fr; margin-top: 120px; }
  .polaroid { margin: 0 auto; }
  .facts { grid-template-columns: 1fr 1fr; }

  .post-head { grid-template-columns: 1fr; gap: 40px; }
  .card-grid--3 { grid-template-columns: 1fr 1fr; }

  .nowt { grid-template-columns: 1fr; }
  .nowt__magpie { width: 220px; margin: 0 auto; }
  .search-page-form { width: 100%; }

  .foot { flex-direction: column-reverse; align-items: flex-start; }
  .foot__magpie { width: 170px; }
}

@media (max-width: 680px) {
  :root { --gutter: 16px; }
  body { font-size: 17px; }
  .site-header .wrap { gap: 16px; padding-top: 18px; padding-bottom: 20px; }
  .wordmark { font-size: 26px; }
  .search-bubble { width: 100%; order: 2; }
  .search-bubble::after { display: none; }
  .tabs { order: 3; }
  .site-header .tabs { margin-bottom: 0; }
  .tabs ul { justify-content: center; }
  .tabs a { padding: 8px 10px; font-size: 15px; }

  .bubble { padding: 44px 30px 46px; }
  .bubble p { font-size: 17px; }
  .ticker { margin: 0 -20px; padding: 12px 34px; flex-wrap: wrap; }
  .ticker__viewport { flex-basis: 100%; }
  .home-latest { margin-top: 90px; }
  .ticker li { font-size: 19px; }
  .ticker li::after { margin: 0 12px; }

  .featured__text { padding: 30px 24px; margin: -30px 6px 0; box-shadow: 10px 10px 0 var(--accent); }

  .rail a { font-size: 36px; }

  .pile, .card-grid, .card-grid--3 { grid-template-columns: 1fr; gap: 44px; }
  .pile > *, .card-grid > * { margin: 0 !important; }
  .pile > :nth-child(odd), .card-grid > :nth-child(odd) { transform: rotate(-0.8deg); }
  .pile > :nth-child(even), .card-grid > :nth-child(even) { transform: rotate(0.8deg); }
  .card--wide { display: block; padding: 16px 16px 24px; }
  .card--wide .card__img { margin-bottom: 18px; }
  .card--wide .card__row { flex-wrap: wrap; }
  .pile__more { justify-self: center; margin: 0; }

  .polaroid { width: 260px; }
  .facts { grid-template-columns: 1fr; }
  .fact:nth-child(2) { transform: rotate(0.8deg); }

  .prose { font-size: 18px; }
  .prose blockquote { font-size: 21px; padding: 22px; }

  .nowt .bubble { padding: 40px 28px; }

  .alignleft, .alignright { float: none; margin: 1em 0; }
  .prose table { display: block; overflow-x: auto; }
}

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

  /* No scrolling for people who've turned motion off: show the items once, wrapped */
  .ticker__track { animation: none; width: auto; }
  .ticker .ticker__copy, .ticker li[aria-hidden='true'] { display: none; }
  .ticker ul { flex-wrap: wrap; flex: 1; row-gap: 4px; }
  .ticker li.ticker__last::after { content: none; }
}
