/* footer.css */
.site-footer { background: #064E27; color: #E8F5EC; margin-top: 2rem; border-top: 3px solid #0A7A3A; font-size: 0.85rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; }
.site-footer a { color: #E8F5EC; text-decoration: none; }
.site-footer a:hover { color: #ff3b40; }

.foot-inner { max-width: 1200px; margin: 0 auto; padding: 0 1rem; }
.foot-row { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 0.4rem 1.5rem; }

/* row 1: wordmark + sections */
.foot-row-1 { padding: 0.9rem 0; border-bottom: 1px solid rgba(232, 245, 236,.18); }
.foot-brand { font-size: 1.35rem; font-weight: 800; color: #F1F7F3; letter-spacing: 0.3px; }
.foot-brand .red { color: #0A7A3A; }
.foot-brand:hover { color: #F1F7F3; }
.foot-row-1 nav ul { gap: 0.2rem 1.6rem; }
.foot-row-1 nav a { font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; font-size: 0.82rem; }

/* row 2: legal, social, copyright */
.foot-row-2 { padding: 0.7rem 0 0.8rem; font-size: 0.8rem; }
.legal, .social { gap: 0.2rem 1.1rem; }
.social { padding-left: 1.1rem; border-left: 1px solid rgba(232, 245, 236,.25); }
.copy { margin: 0; color: #a9a495; }

@media (max-width: 900px) {
  .foot-row { justify-content: center; text-align: center; }
  .site-footer ul { justify-content: center; }
  .social { border-left: 0; padding-left: 0; }
}
/* subscribe box (replaces the wordmark) */
.foot-subscribe { display: flex; gap: 0.4rem; flex: 0 1 380px; min-width: 260px; }
.foot-subscribe input[type=email] { flex: 1; min-width: 0; padding: 0.5rem 0.7rem; border: 1px solid rgba(232, 245, 236,.35); border-radius: 4px; background: #08381C; color: #F1F7F3; font: inherit; font-size: 0.85rem; }
.foot-subscribe input[type=email]::placeholder { color: #a9a495; }
.foot-subscribe input[type=email]:focus { outline: 0; border-color: #E8F5EC; }
.foot-subscribe button { background: #0A7A3A; color: #fff; border: 0; padding: 0.5rem 1rem; border-radius: 4px; font: inherit; font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.5px; cursor: pointer; }
.foot-subscribe button:hover { background: #086A32; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }

@media (max-width: 900px) { .foot-subscribe { flex: 1 1 100%; } }

/* mobile.css */
/* phone header (loads last, so it wins over earlier header styles) */
.m-sub { display: none; }

@media (max-width: 800px) {
  .navbar { position: relative; flex-direction: column; }

  /* top row: logo left, Subscribe right */
  .brand { justify-content: flex-start; padding: 0.6rem 1rem; border-right: 0; border-bottom: 0; }
  .brand-img { width: auto; height: 40px; max-width: 200px; }
  .brand-text { font-size: 1.4rem; }
  .m-sub { display: inline-flex; align-items: center; position: absolute; right: 1rem; top: calc(0.6rem + 20px); transform: translateY(-50%); background: #0A7A3A; color: #fff; font-size: 0.85rem; font-weight: 700; padding: 0.45rem 1.1rem; border-radius: 999px; text-decoration: none; }
  .masthead a.m-sub:hover { background: #086A32; color: #fff; }

  /* second row: swipeable section tabs */
  .main-nav { position: relative; display: block; flex: none; width: 100%; border-top: 1px solid rgba(255,255,255,.15); }
  .main-nav::after { content: ''; position: absolute; top: 0; right: 0; bottom: 0; width: 32px; background: linear-gradient(to left, #064E27, rgba(11,26,48,0)); pointer-events: none; }
  .main-nav > ul { display: flex; flex-wrap: nowrap; height: auto; overflow-x: auto; overflow-y: hidden; -webkit-overflow-scrolling: touch; scrollbar-width: none; padding-right: 2rem; }
  .main-nav > ul::-webkit-scrollbar { display: none; }
  .main-nav > ul > li { flex: 0 0 auto; border-right: 0; }
  .main-nav > ul > li > a { display: block; height: auto; padding: 0.85rem 1rem 0.7rem; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.5px; text-transform: uppercase; white-space: nowrap; color: #aab6c8; border-bottom: 3px solid transparent; line-height: 1.2; }
  .main-nav > ul > li > a:hover { background: none; color: #fff; }
  .main-nav > ul > li > a.active { color: #fff; border-bottom-color: #0A7A3A; }
  .has-dropdown > a::after { content: none; }
  .main-nav .dropdown { display: none !important; }
}
/* ===== sidebars on tablets and phones ===== */
@media (max-width: 1000px) {
  .home-layout, .post-layout { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
  .sidebar, .post-side { position: static; max-height: none; overflow: visible; width: 100%; min-width: 0; padding-left: 0; }
}

@media (max-width: 800px) {
  /* every block becomes a roomy card */
  .sidebar { margin-top: 0.5rem; }
  .s-block, .soc-box, .pt { background: #fff; border: 1px solid #DDE6E0; border-radius: 10px; padding: 1rem; margin: 0 0 0.9rem; }
  .s-title, .soc-box h3, .pt h3, .rec h3 { font-size: 0.85rem; margin-bottom: 0.8rem; }
  .s-more, .pt-more { display: block; margin-top: 0.8rem; padding-top: 0.7rem; border-top: 1px solid #eee; font-size: 0.92rem; text-align: center; }

  /* Match Centre */
  .mc { padding: 1rem; border-radius: 10px; margin-bottom: 0.9rem; }
  .mc-row { gap: 0.5rem; }
  .mc-team { font-size: 0.95rem; overflow-wrap: anywhere; }
  .mc-score { font-size: 1.7rem; }
  .mc-time { font-size: 1.15rem; padding: 0.15rem 0.5rem; }
  .mc-meta { font-size: 0.8rem; }

  /* Most read */
  .s-block:has(.s-read) { padding: 1rem; }
  .s-read li { grid-template-columns: 96px 1fr; gap: 0.8rem; padding: 0.75rem 0; }
  .s-read li::before { top: 0.75rem; }
  .hr-thumb { width: 96px; height: 68px; }
  .hr-text a { font-size: 1rem; line-height: 1.3; }

  /* Subscribe */
  .s-sub input[type=email] { font-size: 16px; padding: 0.75rem; }
  .s-sub button { padding: 0.8rem; font-size: 0.95rem; }

  /* fixtures and results */
  .s-matches li { padding: 0.75rem 0; column-gap: 0.8rem; }
  .sm-teams { font-size: 1rem; line-height: 1.3; overflow-wrap: anywhere; }
  .sm-end { font-size: 1rem; white-space: nowrap; }
  .sm-meta { font-size: 0.8rem; margin-top: 0.15rem; }

  /* league tables: fixed columns, team name shortens instead of overflowing */
  .s-table, .pt-table { table-layout: fixed; width: 100%; font-size: 0.9rem; }
  .s-table th, .pt-table th { font-size: 0.72rem; padding: 0 0.2rem 0.45rem; }
  .s-table td, .pt-table td { padding: 0.55rem 0.2rem; }
  .s-table th:nth-child(1), .s-table td:nth-child(1), .pt-table th:nth-child(1), .pt-table td:nth-child(1) { width: 2rem; }
  .s-table th:nth-child(3), .s-table td:nth-child(3), .pt-table th:nth-child(3), .pt-table td:nth-child(3) { width: 2.4rem; }
  .s-table th:nth-child(4), .s-table td:nth-child(4), .pt-table th:nth-child(4), .pt-table td:nth-child(4) { width: 2.8rem; }
  .s-table th:nth-child(5), .s-table td:nth-child(5), .pt-table th:nth-child(5), .pt-table td:nth-child(5) { width: 2.8rem; }
  .s-table .tl, .pt-table .tl { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .s-table img, .pt-table img { width: 18px; height: 18px; margin-right: 0.4rem; }

  /* social buttons: five equal tiles across the width */
  .soc-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 0.5rem; }
  .soc { width: 100%; height: 48px; }

  /* Recommended for you */
  .rec { padding: 1rem 1rem 0.3rem; border-radius: 10px; margin-bottom: 0.9rem; }
  .rec-item { grid-template-columns: 38% 1fr; gap: 0.8rem; padding: 0.8rem 0; }
  .rec-title { font-size: 0.98rem; line-height: 1.3; }
}

/* ===== category menu: always one line, swipe sideways ===== */
.ls-nav { display: flex; flex-wrap: nowrap; overflow-x: auto; overflow-y: hidden; white-space: nowrap; gap: 0 1.4rem; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.ls-nav::-webkit-scrollbar { display: none; }
.ls-nav a { flex: 0 0 auto; }

.ls .meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.6rem; }
.ls .meta .ago { color: #666; font-weight: 500; }

/* ===== category and tag posts as cards on phones ===== */
@media (max-width: 800px) {
  .ls-nav a { padding: 0.75rem 0; font-size: 0.9rem; }

  .ls-list .post, .ls .post { display: grid; grid-template-columns: 38% 1fr; gap: 0.8rem; align-items: start; background: #fff; border: 1px solid #DDE6E0; border-radius: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.05); padding: 0.65rem; margin: 0 0 0.8rem; }
  .ls .post:last-child { border-bottom: 1px solid #DDE6E0; }
  .ls .post-thumb { height: auto; min-height: 0; aspect-ratio: 4 / 3; border-radius: 8px; }
  .ls .post-thumb img, .ls .post-thumb .ph { width: 100%; height: 100%; object-fit: cover; }
  .ls .post-body { min-width: 0; }

  .ls .meta { font-size: 0.8rem; margin-bottom: 0.2rem; }
  .ls .meta strong { font-weight: 600; color: #222; }
  .ls .post-body h3 { margin: 0 0 0.5rem; font-size: 1rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .ls .post-body p { display: none; }

  .ls .chips { flex-wrap: nowrap; overflow: hidden; gap: 0.35rem; }
  .ls .chips .chip { flex: 0 0 auto; font-size: 0.7rem; padding: 2px 9px; white-space: nowrap; }
  .ls .chips .chip:nth-child(n+3) { display: none; }

  .ls-more button { width: 100%; }
}

/* floating search lens (bottom left, all screens) */
.float-search { position: fixed; left: 1.1rem; bottom: calc(1.1rem + env(safe-area-inset-bottom, 0px)); z-index: 900; width: 50px; height: 50px; display: flex; align-items: center; justify-content: center; background: #064E27; color: #E8F5EC; border: 2px solid #0A7A3A; border-radius: 50%; box-shadow: 0 4px 14px rgba(0,0,0,.35); text-decoration: none; transition: background .15s, transform .15s; }
.float-search:hover { background: #0A7A3A; color: #fff; transform: scale(1.06); }
.float-search.hide { display: none; }
@media (max-width: 800px) { .float-search { left: 0.8rem; width: 46px; height: 46px; } }

/* ===== no cards on phones: flat rows with thin dividers ===== */
@media (max-width: 800px) {
  /* category, tag, author, date and search posts */
  .ls-list .post, .ls .post { background: none; border: 0; border-top: 1px solid #CDD9D1; border-radius: 0; box-shadow: none; padding: 0.95rem 0; margin: 0; }
  .ls .post:first-child { border-top: 0; }
  .ls .post:last-child { border-bottom: 0; }
  .ls .post-thumb { border-radius: 4px; }

  /* sidebar sections (coloured panels such as Match Centre and Most read stay as they are) */
  .sidebar .s-block:not(:has(.s-read)), .sidebar .soc-box, .post-side .soc-box, .post-side .pt, .sidebar .s-sub {
    background: none; border: 0; border-top: 1px solid #CDD9D1; border-radius: 0; box-shadow: none; padding: 1.1rem 0; margin: 0;
  }
  .sidebar .s-block.s-sub { padding-top: 1.1rem; }
  .s-sub input[type=email] { background: #fff; }
  .s-more, .pt-more { text-align: left; border-top: 0; padding-top: 0; margin-top: 0.6rem; }
}

/* ===== post card (homepage + listings) and grey labels ===== */
.chips .chip, a.chip { background: #eceff1; color: #1a1a1a; font-size: 0.9rem; font-weight: 500; text-transform: none; letter-spacing: 0; padding: 0.3rem 0.8rem; border-radius: 6px; }
.chips .chip:hover, a.chip:hover { background: #dde2e5; color: #000; }
.lead .tag { background: rgba(255,255,255,.92); color: #111; }
.tag-row.small .tag { background: #eceff1; color: #1a1a1a; }

.post .meta { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.1rem 0.65rem; font-size: 0.95rem; font-weight: 400; color: #222; }
.post .meta strong { font-weight: 500; }
.post .meta .ago { color: #666; font-weight: 400; }

/* desktop homepage */
.posts .post { grid-template-columns: 36% minmax(0, 1fr); gap: 1.1rem; background: #fff; border: 0; border-radius: 12px; box-shadow: 0 1px 5px rgba(0,0,0,.12); padding: 0.45rem; margin-bottom: 0.9rem; }
.posts .post-thumb { height: 100%; min-height: 170px; border-radius: 8px; }
.posts .post-body { display: flex; flex-direction: column; min-width: 0; padding: 0.35rem 0.6rem 0.35rem 0; }
.posts .post-body h3 { margin: 0.35rem 0 0.45rem; font-size: clamp(1.15rem, 1.7vw, 1.5rem); font-weight: 700; line-height: 1.3; }
.posts .post-body h3 a { color: #2b2b2b; }
.posts .post-body h3 a:hover { color: var(--brand-dark); }
.posts .post-body p { margin: 0 0 0.8rem; color: #666; font-size: 1rem; line-height: 1.45; -webkit-line-clamp: 2; }
.posts .chips { margin-top: auto; }

/* phones */
@media (max-width: 800px) {
  .m-home .post, .ls .post { display: grid; grid-template-columns: 38% minmax(0, 1fr); gap: 0.8rem; align-items: start; background: #fff; border: 0; border-radius: 12px; box-shadow: 0 1px 4px rgba(0,0,0,.12); padding: 0.55rem; margin: 0 0 0.75rem; }
  .ls .post:first-child, .ls .post:last-child { border: 0; }
  .m-home .post-thumb, .ls .post-thumb { height: auto; min-height: 0; aspect-ratio: 4 / 3; border-radius: 8px; }
  .m-home .post-thumb img, .m-home .post-thumb .ph { width: 100%; height: 100%; object-fit: cover; }
  .m-home .post-body { min-width: 0; padding: 0; }
  .m-home .post-body p { display: none; }
  .m-home .post-body h3 { margin: 0.2rem 0 0.5rem; font-size: 1rem; font-weight: 700; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .m-home .post-body h3 a { color: #2b2b2b; text-transform: capitalize; }
  .m-home .meta { font-size: 0.8rem; }
  .m-home .chips { flex-wrap: nowrap; overflow: hidden; gap: 0.35rem; }
  .m-home .chips .chip { flex: 0 0 auto; font-size: 0.75rem; padding: 0.2rem 0.6rem; white-space: nowrap; }
  .m-home .chips .chip:nth-child(n+3) { display: none; }
}

/* ===== every post title turns Arsenal red on hover ===== */
.lead:hover h2,
.top-item:hover h3,
.top-item h3:hover,
.post-body h3 a:hover,
.posts .post-body h3 a:hover,
.card h2 a:hover,
.m-home h2 a:hover,
.m-home h3 a:hover,
.mh-feat:hover .mh-ftext h2 a,
.s-read a:hover,
.hr-text a:hover,
.most-read li a:hover,
.rec-item:hover .rec-title,
.ml-card:hover .ml-title,
.rm-card:hover .rm-title,
.article-body a.ra-title:hover,
.ticker-move a:hover,
.s-block:has(.s-read) .hr-text a:hover { color: #0A7A3A !important; }

/* ===== phones: every page uses 94% of the screen width ===== */
@media (max-width: 800px) {
  main.container { width: 94% !important; max-width: none !important; margin-left: auto !important; margin-right: auto !important; padding-left: 0; padding-right: 0; }
  .post-layout, .home-layout, .nr, .doc-sheet { max-width: none; }
}

/* readable hover: mint green on dark surfaces, white with a green underline on a photo headline */
html[data-theme="dark"] .top-item:hover h3,
html[data-theme="dark"] .top-item h3:hover,
html[data-theme="dark"] .post-body h3 a:hover,
html[data-theme="dark"] .posts .post-body h3 a:hover,
html[data-theme="dark"] .card h2 a:hover,
html[data-theme="dark"] .m-home h2 a:hover,
html[data-theme="dark"] .m-home h3 a:hover,
html[data-theme="dark"] .s-read a:hover,
html[data-theme="dark"] .hr-text a:hover,
html[data-theme="dark"] .most-read li a:hover,
html[data-theme="dark"] .rec-item:hover .rec-title,
html[data-theme="dark"] .ml-card:hover .ml-title,
html[data-theme="dark"] .rm-card:hover .rm-title,
html[data-theme="dark"] .article-body a.ra-title:hover,
html[data-theme="dark"] .ticker-move a:hover,
html[data-theme="dark"] .s-block:has(.s-read) .hr-text a:hover { color: #8FE3AF !important; }
html body .mh-feat:hover .mh-ftext h2 a { color: #fff !important; text-decoration: underline; text-decoration-color: #8FE3AF; text-underline-offset: 4px; }

/* mobile-polish.css */
/* Phone polish: readable sizes, full headlines, wrapping labels, tidy floating buttons.
   Loads after mobile.css on every page, so it wins. Nothing here applies above 800px
   (except the touch-hover fix), so the desktop layout is untouched. */

@media (max-width: 800px) {
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { line-height: 1.5; overflow-wrap: break-word; }
  h1, h2, h3, h4 { overflow-wrap: break-word; }
  img, video, iframe, table { max-width: 100%; }

  /* less empty space under the menu */
  main.container { padding-top: 1.1rem !important; padding-bottom: 1.5rem; }

  /* ---------- page headings (categories, tags, authors, search) ---------- */
  .ls-title { font-size: 1.55rem; line-height: 1.2; margin: 0 0 0.6rem; }
  .ls-nav { margin-bottom: 0.75rem; }
  .ls-nav a { font-size: 0.95rem; padding: 0.7rem 0; }
  .ls-intro { padding: 0.85rem 1rem; }
  .ls-tagline { font-size: 1.1rem; }

  /* ---------- post rows (homepage list, categories, tags, search) ---------- */
  .ls .post, .ls-list .post, .m-home .post { grid-template-columns: 36% minmax(0, 1fr); gap: 0.85rem; padding: 0.65rem; margin: 0 0 0.8rem; align-items: start; }
  .ls .post-body, .m-home .post-body { min-width: 0; }

  /* whole headline shows: no clipping, no "..." */
  .ls .post-body h3, .m-home .post-body h3 {
    display: block; overflow: visible; -webkit-line-clamp: unset; -webkit-box-orient: initial;
    margin: 0.15rem 0 0.55rem; font-size: 1.03rem; line-height: 1.3; font-weight: 700; letter-spacing: 0;
  }
  .ls .meta, .m-home .meta { font-size: 0.84rem; line-height: 1.35; gap: 0.1rem 0.55rem; margin-bottom: 0.15rem; }

  /* labels wrap instead of being cut off; show category + first tag */
  .ls .chips, .m-home .chips { flex-wrap: wrap; overflow: visible; gap: 0.35rem; }
  .ls .chips .chip, .m-home .chips .chip { flex: 0 1 auto; font-size: 0.76rem; line-height: 1.25; padding: 0.28rem 0.6rem; white-space: normal; max-width: 100%; }
  .ls .chips .chip:nth-child(n+3), .m-home .chips .chip:nth-child(n+3) { display: none; }

  /* big featured card on the phone homepage */
  .mh-fbody { padding: 0.9rem 1rem 1.05rem; }
  .mh-fchips a { font-size: 0.76rem; padding: 0.3rem 0.65rem; }
  .mh-fbody h2 { font-size: 1.32rem; line-height: 1.25; }
  .mh-fmeta { font-size: 0.88rem; }

  /* ---------- single story page ---------- */
  .post-title { font-size: 1.6rem; line-height: 1.22; margin-bottom: 0.7rem; }
  .post-by { font-size: 0.98rem; }
  .post-date { font-size: 0.92rem; margin-bottom: 0.9rem; }
  .article-body { font-size: 1.08rem; line-height: 1.65; }
  .article-body h2 { font-size: 1.4rem; }
  .article-body h3 { font-size: 1.2rem; }
  .article-body table { display: block; overflow-x: auto; }
  .read-also .ra-title, .article-body a.ra-title { font-size: 1.15rem; }
  .rm-title, .ml-title, .rec-title { display: block; -webkit-line-clamp: unset; overflow: visible; }
  .rm-title { font-size: 1rem; }
  .ml-title { font-size: 1.05rem; }
  .rec-title { font-size: 0.98rem; }
  .post-topics a { font-size: 0.9rem; padding: 0.4rem 0.8rem; }
  .crumbs { font-size: 0.88rem; }

  /* ---------- Match Centre ---------- */
  .mc-team span { overflow-wrap: anywhere; }
  .mc-title { font-size: 1.55rem; }

  /* ---------- floating search and bell: smaller, same line, never over the footer text ---------- */
  .float-search { left: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); width: 42px; height: 42px; opacity: 0.94; }
  .float-search svg { width: 19px; height: 19px; }
  html body .bell-fab { right: 0.75rem; bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px)); width: 42px; height: 42px; opacity: 0.94; }
  html body .bell-fab svg { width: 20px; height: 20px; }
  html body .bell-dot { top: 6px; right: 7px; width: 9px; height: 9px; }
  html body .bell-panel { bottom: calc(0.75rem + 42px + 0.6rem + env(safe-area-inset-bottom, 0px)); right: 0.6rem; left: 0.6rem; max-height: calc(100vh - 120px); }

}

/* touch screens have no hover: stop headlines staying red after a tap */
@media (hover: none) {
  .mh-feat .mh-fbody h2 a,
  .mh-feat:hover .mh-fbody h2 a,
  .m-home h2 a:hover, .m-home h3 a:hover,
  .post-body h3 a:hover { color: #1a1a1a !important; }
  .mh-feat:hover .mh-fbody h2 a:active { color: #0A7A3A !important; }
}

/* ===== flat, aligned layout on phones: no cards ===== */
@media (max-width: 800px) {
  /* each story is a flat row with a thin divider; text lines up with the page heading */
  .ls .post, .ls .post:last-child, .ls-list .post, .m-home .post, .m-home .post:last-child {
    background: none; box-shadow: none; border: 0; border-top: 1px solid #CDD9D1; border-radius: 0;
    padding: 1rem 0; margin: 0; align-items: stretch; gap: 0.95rem; grid-template-columns: 34% minmax(0, 1fr);
  }
  .ls .post:first-child, .m-home .post:first-child { border-top: 0; padding-top: 0.4rem; }

  /* picture fills the whole row height, so a long headline never leaves a blank gap under it */
  .ls .post-thumb, .m-home .post-thumb { position: relative; align-self: stretch; height: auto; min-height: 98px; aspect-ratio: auto; border-radius: 6px; overflow: hidden; }
  .ls .post-thumb img, .m-home .post-thumb img, .ls .post-thumb .ph, .m-home .post-thumb .ph { position: absolute; inset: 0; width: 100%; height: 100%; min-height: 0; object-fit: cover; }

  /* text column: meta, headline, then labels pinned to the bottom edge of the picture */
  .ls .post-body, .m-home .post-body { display: flex; flex-direction: column; padding: 0; }
  .ls .post-body h3, .m-home .post-body h3 { margin: 0.1rem 0 0.6rem; }
  .ls .chips, .m-home .chips { margin-top: auto; }

  /* big first story on the phone homepage: flat too */
  .mh-feat { background: none; box-shadow: none; border-radius: 0; overflow: visible; margin: 0 0 1rem; padding-bottom: 1rem; border-bottom: 1px solid #CDD9D1; }
  .mh-fimg { border-radius: 8px; }
  .mh-fbody { padding: 0.85rem 0 0; }
}

/* very small phones: picture on top, text below */
@media (max-width: 360px) {
  .ls .post, .ls .post:last-child, .ls-list .post, .m-home .post, .m-home .post:last-child { grid-template-columns: minmax(0, 1fr); }
  .ls .post-thumb, .m-home .post-thumb { aspect-ratio: 16 / 9; min-height: 0; }
}

/* ===== compact news-feed rows: small picture left, headline, one line of label + author + time ===== */
@media (max-width: 800px) {
  .ls .post, .ls .post:last-child, .ls-list .post, .m-home .post, .m-home .post:last-child {
    grid-template-columns: 31% minmax(0, 1fr); gap: 0.8rem; padding: 0.8rem 0; border-top: 1px solid rgba(239, 1, 7, 0.45);
  }
  .ls .post:first-child, .m-home .post:first-child { border-top: 0; padding-top: 0.3rem; }
  .ls .post-thumb, .m-home .post-thumb { min-height: 84px; border-radius: 4px; }

  .ls .post-body, .m-home .post-body { flex-direction: row; flex-wrap: wrap; align-content: flex-start; align-items: center; gap: 0.3rem 0.5rem; }
  .ls .post-body h3, .m-home .post-body h3 { order: 1; flex: 0 0 100%; margin: 0 0 0.15rem; font-size: 1rem; line-height: 1.28; font-weight: 700; color: #111; }
  .ls .chips, .m-home .chips { order: 2; margin: 0; flex: 0 0 auto; }
  .ls .meta, .m-home .meta { order: 3; margin: 0; flex: 0 1 auto; font-size: 0.74rem; color: #666; gap: 0 0.35rem; flex-wrap: nowrap; white-space: nowrap; }
  .ls .meta strong, .m-home .meta strong { font-weight: 600; color: #333; }
  .ls .meta .ago, .m-home .meta .ago { color: #666; }
  .ls .chips .chip, .m-home .chips .chip { font-size: 0.72rem; font-weight: 600; padding: 0.12rem 0.45rem; border-radius: 4px; white-space: nowrap; }
  .ls .chips .chip:nth-child(n+2), .m-home .chips .chip:nth-child(n+2) { display: none; }
}
@media (max-width: 360px) {
  .ls .post-thumb, .m-home .post-thumb { min-height: 0; }
}

/* ===== clean footer on phones ===== */
@media (max-width: 800px) {
  .site-footer { margin-top: 1.5rem; padding-bottom: 5.2rem; font-size: 0.9rem; }
  /* same 94% width as the page, so footer edges line up with the stories above */
  .site-footer .foot-inner { width: 94%; max-width: none; margin: 0 auto; padding: 0; }
  .site-footer .foot-row { flex-direction: column; align-items: stretch; justify-content: flex-start; text-align: left; gap: 0; }

  /* subscribe: full width, 16px text so phones do not zoom in */
  .site-footer .foot-row-1 { padding: 1.5rem 0 0.5rem; border-bottom: 1px solid rgba(232, 245, 236, 0.18); }
  .site-footer .foot-subscribe { flex: none; width: 100%; min-width: 0; margin-bottom: 1.2rem; gap: 0.5rem; }
  .site-footer .foot-subscribe input[type=email] { padding: 0.8rem 0.9rem; font-size: 16px; border-radius: 6px; }
  .site-footer .foot-subscribe button { padding: 0.8rem 1.1rem; font-size: 0.8rem; border-radius: 6px; }

  /* sections: two tidy columns */
  .site-footer .foot-row-1 nav ul { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
  .site-footer .foot-row-1 nav li { border-top: 1px solid rgba(232, 245, 236, 0.12); }
  .site-footer .foot-row-1 nav a { display: block; padding: 0.8rem 0; font-size: 0.86rem; letter-spacing: 0.7px; }

  /* legal links: two columns, quieter */
  .site-footer .foot-row-2 { padding: 1.1rem 0 0; }
  .site-footer .legal { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
  .site-footer .legal a { display: block; padding: 0.5rem 0; font-size: 0.9rem; color: #cfc8b2; }

  /* social: one even row */
  .site-footer .social { display: flex; flex-wrap: wrap; justify-content: flex-start; gap: 0.2rem 1.6rem; margin-top: 0.9rem; padding: 1rem 0 0; border: 0; border-top: 1px solid rgba(232, 245, 236, 0.18); }
  .site-footer .social a { font-size: 0.88rem; padding: 0.2rem 0; }

  .site-footer .copy { margin-top: 1rem; padding-top: 0.9rem; border-top: 1px solid rgba(232, 245, 236, 0.18); text-align: left; font-size: 0.8rem; }
}

/* rec-title sidebar weight: lighter, easier to read */
html body .rec .rec-title { font-weight: 500; line-height: 1.4; }
html body .rec h3 { font-weight: 700; }


/* story images fill width */
html body .article-body img { display: block; width: 100% !important; max-width: 100% !important; height: auto !important; margin: 1.2rem 0 0.5rem; }
html body .article-body figure, html body .article-body .wp-caption, html body .article-body p > img { width: 100% !important; max-width: 100% !important; margin-left: 0; margin-right: 0; }
html body .article-body figure img { margin: 0; }
html body .article-body figcaption { font-size: 0.85rem; color: #6a6a6a; margin: 0.4rem 0 1.2rem; }
html body .article-body img.emoji, html body .article-body img[width='16'], html body .article-body img[width='20'] { display: inline; width: auto !important; margin: 0; }

/* row-thumb-fix: keep the small picture inside its column on phones */
@media (max-width: 800px) {
html body .ls .post-thumb, html body .ls-list .post-thumb, html body .m-home .post-thumb { aspect-ratio: auto; width: 100%; min-width: 0; max-width: 100%; min-height: 84px; }
}

/* read-also-compact: small thumbnail left, headline right, on phones */
@media (max-width: 800px) {
html body .article-body .read-also, html body .read-also { grid-template-columns: 31% minmax(0, 1fr); gap: 0.8rem; align-items: center; margin: 1.4rem 0; padding: 0.8rem 0; }
html body .read-also .ra-thumb { width: 100%; min-width: 0; height: 84px; border-radius: 4px; }
html body .read-also .ra-label { font-size: 0.7rem; margin-bottom: 0.2rem; }
html body .article-body a.ra-title, html body .read-also .ra-title { font-size: 1rem; line-height: 1.28; }
}

/* read-also-img-fix: the story-image rule must not resize the Read also thumbnail on phones */
@media (max-width: 800px) {
html body .article-body .read-also .ra-thumb img { width: 100% !important; max-width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; display: block; }
}

/* post-mobile-layout: two-column related stories and a standard reading size on phones */
@media (max-width: 800px) {
html body .might-like .ml-grid, html body .read-more .rm-grid, html body .rm-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.9rem 0.7rem; }
html body .ml-card, html body .rm-card { min-width: 0; margin: 0; }
html body .ml-img, html body .rm-img { display: block; aspect-ratio: 4 / 3; overflow: hidden; }
html body .ml-img img, html body .rm-img img { width: 100% !important; height: 100% !important; margin: 0 !important; object-fit: cover; display: block; }
html body .ml-title, html body .rm-title { display: block; font-size: 0.9rem; line-height: 1.3; margin-top: 0.4rem; overflow-wrap: anywhere; }
html body .article-body { font-size: 1.125rem; line-height: 1.7; }
html body .article-body p { margin-bottom: 1.1rem; }
}

/* refine.css */
/* refine.css: five design refinements. Loaded last, so it only needs light specificity. */

/* 1. Hero headline: stronger text shadow. The existing dark gradient behind it (up to .92) is already heavier than the recommended one, so it is kept. */
html body .lead h2 { text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5); }
html body .lead .tag-row .by, html body .lead .tag-row .when { text-shadow: 0 1px 4px rgba(0, 0, 0, 0.55); }

/* 2. LATEST ticker: heavier, tidier label with a red underline accent; the bar already scrolls and respects reduced motion. */
html body .ticker-label { font-size: 0.86rem; font-weight: 800; letter-spacing: 1.3px; box-shadow: inset 0 -3px 0 #0A7A3A; }
html body .ticker { box-shadow: 0 1px 0 rgba(11, 26, 48, 0.18); }

/* 3. Category pills: brand red with white text everywhere (same radius, padding and weight as before). */
html body .tag, html body .mh-fchips a { background: #0A7A3A; color: #fff; }
html body .mh-fchips a:hover, html body a.tag:hover { background: #086A32; color: #fff; }

/* 4. Story feed rhythm: about 8px less between consecutive items. The cards themselves are unchanged. */
html body .home-layout .post { margin-bottom: 0.5rem; }
html body .ls .post { padding-top: 1rem; padding-bottom: 1rem; }
@media (max-width: 800px) {
  html body .m-home .post, html body .m-home .post:last-child { margin-bottom: 0.4rem; }
  html body .ls .post, html body .ls .post:last-child, html body .ls-list .post, html body .m-home .post { padding-top: 0.65rem; padding-bottom: 0.65rem; }
}

/* the dark mode toggle button */
.theme-toggle { position: fixed; left: 0.9rem; bottom: 5.1rem; z-index: 90; width: 42px; height: 42px; border-radius: 50%; border: 2px solid #fff; background: #064E27; color: #fff; display: inline-flex; align-items: center; justify-content: center; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3); padding: 0; }
.theme-toggle:hover { background: #0A7A3A; }
.theme-toggle:focus-visible { outline: 3px solid #f3e3a0; outline-offset: 2px; }
.theme-toggle svg { width: 20px; height: 20px; display: block; }
.theme-toggle .ic-sun { display: none; }
html[data-theme="dark"] .theme-toggle .ic-sun { display: block; }
html[data-theme="dark"] .theme-toggle .ic-moon { display: none; }
@media print { .theme-toggle { display: none; } }

/* toggle inside the header bar (does not float over the page) */
html body .theme-toggle.in-bar { position: static; flex: 0 0 auto; width: 36px; height: 36px; margin: 0 0 0 0.6rem; background: rgba(255, 255, 255, 0.14); border: 2px solid rgba(255, 255, 255, 0.85); box-shadow: none; z-index: auto; }
html body .theme-toggle.in-bar:hover { background: #064E27; }
html body .theme-toggle.in-bar svg { width: 18px; height: 18px; }
html body .theme-toggle.in-bar { align-self: center; margin-left: 0.5rem; }
/* Subscribe + dark mode button on one line */
html body .m-actions { display: flex; align-items: center; gap: 0.5rem; position: absolute; transform: translateY(-50%); margin: 0; z-index: 5; }
html body .m-actions .m-sub { margin: 0; }
html body .m-actions .theme-toggle.in-bar { margin: 0; }
/* the phone Subscribe link may be absolutely positioned by older rules; inside the shared box it flows normally so both stay on one line */
html body .m-actions { flex-wrap: nowrap; white-space: nowrap; }
html body .m-actions .m-sub { position: static !important; inset: auto !important; transform: none !important; float: none !important; flex: 0 0 auto; margin: 0 !important; }
html body .m-actions .theme-toggle.in-bar { flex: 0 0 auto; }

/* desktop: the button is a plain cell at the end of the menu, like the other menu items, with the same thin divider */
@media (min-width: 801px) {
  html body .theme-toggle.in-bar { align-self: stretch; width: auto; height: auto; min-width: 58px; margin: 0; padding: 0 1.1rem; border: 0; border-left: 1px solid rgba(232, 245, 236, 0.22); border-radius: 0; background: transparent; color: #E8F5EC; }
  html body .theme-toggle.in-bar:hover { background: rgba(255, 255, 255, 0.09); color: #fff; }
  html body .theme-toggle.in-bar svg { width: 20px; height: 20px; }
  html body .theme-toggle.in-bar:focus-visible { outline: 3px solid #f3e3a0; outline-offset: -3px; }
}

/* bell.css */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.bell-fab { position: fixed; right: 18px; bottom: 86px; z-index: 900; width: 50px; height: 50px; border-radius: 50%; border: 0; cursor: pointer;
  background: #086A32; color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 4px 14px rgba(0,0,0,.28); }
.bell-fab:hover { background: #a30005; }
.bell-fab:focus-visible, .bell-save:focus-visible, .bell-close:focus-visible { outline: 3px solid #064E27; outline-offset: 2px; }
.bell-dot { position: absolute; top: 8px; right: 9px; width: 11px; height: 11px; border-radius: 50%; background: #f5c400; border: 2px solid #086A32; }
.bell-dot[hidden], .bell-fab.on .bell-dot { display: none; }
.bell-panel { position: fixed; right: 18px; bottom: 148px; z-index: 901; width: min(360px, calc(100vw - 24px)); max-height: calc(100vh - 170px); overflow: auto;
  background: #fff; color: #1a1a1a; border-radius: 10px; border-top: 4px solid #086A32; box-shadow: 0 10px 34px rgba(0,0,0,.3); padding: 14px 16px 16px; }
.bell-panel[hidden] { display: none; }
.bell-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.bell-head h2 { margin: 0; font-size: 1.1rem; color: #064E27; }
.bell-close { background: none; border: 0; font-size: 1.6rem; line-height: 1; cursor: pointer; color: #555; padding: 2px 8px; }
.bell-panel fieldset, .notify-form fieldset { border: 0; padding: 0; margin: 10px 0; }
.bell-panel legend, .notify-form legend { font-weight: 700; font-size: .9rem; margin-bottom: 6px; padding: 0; color: #064E27; }
.bell-cats { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 10px; }
.bell-cats legend { grid-column: 1 / -1; }
.bell-all { grid-column: 1 / -1; font-weight: 700; }
.bell-panel label, .notify-form label { display: flex; align-items: center; gap: 8px; font-size: .95rem; padding: 3px 0; cursor: pointer; }
.bell-panel input[type=checkbox], .notify-form input[type=checkbox] { width: 18px; height: 18px; accent-color: #086A32; flex: none; }
.bell-how label { flex-wrap: wrap; }
.bell-how small { color: #666; font-size: .78rem; flex-basis: 100%; margin-left: 26px; }
.bell-how small:empty { display: none; }
#bellEmail { width: 100%; box-sizing: border-box; margin-top: 6px; padding: 9px 10px; border: 1px solid #c9bfa6; border-radius: 4px; font: inherit; }
#bellEmail[hidden] { display: none; }
.bell-save { width: 100%; margin-top: 8px; padding: 11px; border: 0; border-radius: 4px; background: #086A32; color: #fff; font: inherit; font-weight: 700; cursor: pointer; }
.bell-save:hover { background: #a30005; }
.bell-save[disabled] { opacity: .6; cursor: wait; }
.bell-status { min-height: 1.2em; margin: 8px 0 0; font-size: .88rem; color: #1b6b32; }
.bell-status.err { color: #b00020; }
.bell-off { background: none; border: 0; color: #555; text-decoration: underline; cursor: pointer; font: inherit; font-size: .82rem; padding: 6px 0 0; }
.notify-page .bell-cats { max-width: 420px; }
.notify-page .bell-save { max-width: 260px; }
@media (max-width: 600px) {
  .bell-fab { right: 12px; bottom: 80px; }
  .bell-panel { right: 8px; left: 8px; width: auto; bottom: 140px; }
}

/* breaking.css */
/* Breaking news bar: fixed to the bottom of the screen on every public page */
.bk { position: fixed; left: 0; right: 0; bottom: 0; z-index: 960; background: #a80005; color: #fff; box-shadow: 0 -4px 18px rgba(0, 0, 0, .28); padding-bottom: env(safe-area-inset-bottom, 0px); animation: bk-up .35s ease-out; }
.bk[hidden] { display: none; }
.bk-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: #c40006; padding: 0.75rem 3vw; }
.bk-label { font-size: 1.15rem; font-weight: 800; letter-spacing: 0.5px; text-transform: uppercase; color: #E8F5EC; }
.bk-close { display: inline-flex; align-items: center; gap: 0.4rem; background: none; border: 0; color: #fff; font: inherit; font-size: 1rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.4px; cursor: pointer; padding: 0.35rem 0; }
.bk-close:hover { color: #E8F5EC; }
.bk-close:focus-visible, .bk-text:focus-visible { outline: 3px solid #E8F5EC; outline-offset: 2px; }
.bk-text { display: block; padding: 0.85rem 3vw 1rem; color: #fff; font-size: 1.08rem; font-weight: 600; line-height: 1.4; text-decoration: none; overflow-wrap: anywhere; }
a.bk-text:hover { color: #fff; text-decoration: underline; }
.bk-nolink { cursor: default; }

/* keep page content and the floating buttons clear of the bar */
html.has-breaking body { padding-bottom: var(--bk-h, 0px); }
html.has-breaking .float-search { bottom: calc(var(--bk-h, 0px) + 1.1rem); }
html.has-breaking body .bell-fab { bottom: calc(var(--bk-h, 0px) + 86px); }
html.has-breaking body .bell-panel { bottom: calc(var(--bk-h, 0px) + 148px); }

@media (max-width: 800px) {
  .bk-top { padding: 0.65rem 3vw; }
  .bk-label { font-size: 1.05rem; }
  .bk-text { font-size: 1.02rem; padding: 0.75rem 3vw 0.9rem; }
  html.has-breaking .float-search { bottom: calc(var(--bk-h, 0px) + 0.75rem); }
  html.has-breaking body .bell-fab { bottom: calc(var(--bk-h, 0px) + 0.75rem); }
  html.has-breaking body .bell-panel { bottom: calc(var(--bk-h, 0px) + 0.75rem + 42px + 0.6rem); }
}
@keyframes bk-up { from { transform: translateY(100%); } to { transform: translateY(0); } }
@media (prefers-reduced-motion: reduce) { .bk { animation: none; } }
@media print { .bk { display: none; } }

/* ===== louder look: white "BREAKING NEWS" tag with a pulsing dot, big headline, glowing edge ===== */
.bk { border-top: 4px solid #E8F5EC; background: #b30005; animation: bk-up .4s ease-out, bk-glow 2.2s ease-in-out .4s infinite; }
.bk-top { background: #d10008; padding: 0.7rem 3vw; }
.bk-label { display: inline-flex; align-items: center; gap: 0.55rem; background: #fff; color: #c40006; padding: 0.3rem 0.85rem 0.3rem 0.7rem; border-radius: 4px; font-size: 1.1rem; font-weight: 800; letter-spacing: 1.2px; line-height: 1.2; }
.bk-label::before { content: ''; flex: none; width: 0.7rem; height: 0.7rem; border-radius: 50%; background: #e00009; box-shadow: 0 0 0 0 rgba(224, 0, 9, .7); animation: bk-dot 1.2s ease-out infinite; }
.bk-close { font-size: 1rem; font-weight: 700; }
.bk-text { font-size: 1.15rem; font-weight: 800; line-height: 1.25; padding: 0.85rem 3vw 1.1rem; }

/* desktop: much bigger headline */
@media (min-width: 801px) {
  .bk-top { padding: 0.8rem 3vw; }
  .bk-label { font-size: 1.45rem; padding: 0.4rem 1.1rem 0.4rem 0.9rem; letter-spacing: 1.8px; }
  .bk-label::before { flex: none; width: 0.9rem; height: 0.9rem; }
  .bk-close { font-size: 1.15rem; }
  .bk-text { font-size: clamp(1.8rem, 2.9vw, 2.8rem); font-weight: 800; line-height: 1.18; letter-spacing: -0.2px; padding: 1.1rem 3vw 1.5rem; }
}
@media (max-width: 800px) {
  .bk-label { font-size: 0.95rem; padding: 0.25rem 0.7rem 0.25rem 0.6rem; }
  .bk-text { font-size: 1.15rem; padding: 0.75rem 3vw 0.95rem; }
}
@keyframes bk-dot { 0% { box-shadow: 0 0 0 0 rgba(224, 0, 9, .75); } 80%, 100% { box-shadow: 0 0 0 0.7rem rgba(224, 0, 9, 0); } }
@keyframes bk-glow { 0%, 100% { box-shadow: 0 -4px 18px rgba(0, 0, 0, .28), 0 -2px 0 rgba(239, 1, 7, 0); } 50% { box-shadow: 0 -6px 30px rgba(239, 1, 7, .75), 0 -2px 0 rgba(239, 1, 7, .5); } }
@media (prefers-reduced-motion: reduce) { .bk, .bk-label::before { animation: none; } }

/* pwa.css */
.ad-install { position: fixed; left: 0.8rem; right: 5rem; bottom: 0.8rem; z-index: 900; display: flex; align-items: center; gap: 0.7rem; max-width: 32rem; margin: 0 auto; padding: 0.75rem 0.9rem; background: #064E27; color: #E8F5EC; border-radius: 12px; box-shadow: 0 6px 24px rgba(0,0,0,.35); font-size: 0.95rem; line-height: 1.35; }
.ad-install p { margin: 0; flex: 1 1 auto; }
.ad-install-go { flex: 0 0 auto; border: 0; border-radius: 8px; padding: 0.55rem 1rem; background: #064E27; color: #fff; font-weight: 700; font-size: 0.95rem; cursor: pointer; }
.ad-install-x { flex: 0 0 auto; border: 0; background: transparent; color: #E8F5EC; font-size: 1.6rem; line-height: 1; padding: 0.1rem 0.4rem; cursor: pointer; }
@media (min-width: 801px) { .ad-install { left: 1rem; right: auto; margin: 0; } }
