/*
 * SUzivo 2026 editorial redesign
 * Visual-only layer. Existing PHP, WordPress queries and JavaScript stay intact.
 */

:root {
  --bg: #f4f1eb;
  --paper: #fffdf9;
  --dark: #101a2b;
  --text: #162033;
  --soft: #4e596a;
  --muted: #778090;
  --line: #ddd8cf;
  --brand: #4c9fe1;
  --brand-dark: #176aa8;
  --brand-soft: #eaf4fb;
  --blue: #4c9fe1;
  --green: #36775b;
  --amber: #bf743e;
  --purple: #735a9e;
  --shadow: 0 22px 70px rgba(19, 29, 46, .10);
  --shadow-soft: 0 10px 34px rgba(19, 29, 46, .06);
  --sidebar-collapsed: 72px;
  --sidebar-expanded: 276px;
  --header-height: 84px;
  --container: 1640px;
  --transition: .26s cubic-bezier(.22, 1, .36, 1);
  --serif: "Josefin Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --sans: "Josefin Sans", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--sans);
  background: var(--bg);
  color: var(--text);
  letter-spacing: -.012em;
}

select, option, button, input, textarea { font-family: var(--sans); }

::selection { background: rgba(76,159,225,.24); color: var(--dark); }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: 3px solid rgba(76,159,225,.42);
  outline-offset: 3px;
}

/* Shell and navigation */
.su-shell { padding-left: var(--sidebar-collapsed); }

.su-sidebar {
  background: #101a2b;
  color: #fff;
  border-right: 0;
  box-shadow: 14px 0 45px rgba(7, 14, 26, .14);
}

.side-menu-head {
  height: var(--header-height);
  border-bottom: 1px solid rgba(255,255,255,.09);
  background: transparent;
  color: #fff;
}

.side-menu-head:hover { background: rgba(255,255,255,.055); }
.side-menu-head .side-hamb-mark { color: #fff; }
.side-logo-sub { color: #fff; font-family: var(--serif); font-size: 26px; letter-spacing: -.02em; }
.side-nav { padding: 15px 10px 20px; gap: 4px; }

.side-link {
  height: 48px;
  border-radius: 12px;
  color: rgba(255,255,255,.72);
  font-weight: 700;
}

.side-link:hover,
.side-link.active {
  color: #fff;
  background: rgba(255,255,255,.09);
}

.side-link.active::before { background: var(--brand); }
.side-link-icon { color: rgba(255,255,255,.62); }
.side-link:hover .side-link-icon, .side-link.active .side-link-icon { color: var(--brand); }
.side-section-label { color: rgba(255,255,255,.38); letter-spacing: .14em; }
.chevron { color: rgba(255,255,255,.42); }
.submenu { padding-left: 42px; }
.sub-link { color: rgba(255,255,255,.53); font-weight: 650; }
.sub-link:hover, .sub-link.active { color: #fff; background: rgba(255,255,255,.07); }

.sidebar-backdrop { backdrop-filter: blur(4px); }

/* Header */
.top-header {
  height: var(--header-height);
  background: rgba(255,253,249,.95);
  border-bottom: 1px solid rgba(180,174,163,.55);
  backdrop-filter: blur(18px) saturate(130%);
}

.top-header-inner { gap: 24px; }

.header-logo {
  width: auto;
  height: 58px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  gap: 11px;
  padding: 0;
  border-radius: 0;
  background: transparent;
  overflow: visible;
}

.header-logo-mark {
  width: 44px;
  height: 50px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border-radius: 4px;
  background: var(--brand);
  box-shadow: 0 8px 22px rgba(76,159,225,.22);
}

.header-logo img,
.header-logo-mark img { width: 44px; height: 44px; object-fit: cover; transform: scale(1.15); }

.header-wordmark { display: grid; line-height: 1; }
.header-wordmark strong { font: 400 27px/1 var(--serif); letter-spacing: -.02em; color: var(--dark); }
.header-wordmark small { margin-top: 5px; color: var(--muted); font-size: 9px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }

.search-wrap {
  max-width: 650px;
  height: 46px;
  margin-left: auto;
  padding: 0 16px 0 8px;
  border-color: #d7d2c9;
  border-radius: 12px;
  background: rgba(255,255,255,.75);
  box-shadow: none;
  transition: border-color var(--transition), box-shadow var(--transition), background var(--transition);
}

.search-wrap:focus-within {
  background: #fff;
  border-color: rgba(76,159,225,.66);
  box-shadow: 0 0 0 4px rgba(76,159,225,.10);
}

.search-submit {
  width: 36px;
  height: 36px;
  border: 0;
  display: grid;
  place-items: center;
  background: transparent;
  color: var(--brand-dark);
  cursor: pointer;
}

.search-wrap input { font-size: 13px; font-weight: 600; }
.search-wrap input::placeholder { color: #9a938a; }

.header-actions { gap: 8px; }
.header-location { display: grid; min-width: 96px; padding-right: 16px; margin-right: 2px; border-right: 1px solid var(--line); line-height: 1.15; }
.header-location b { font-family: var(--serif); font-size: 15px; font-weight: 400; color: var(--dark); }
.header-location small { margin-top: 3px; color: var(--muted); font-size: 9px; font-weight: 700; letter-spacing: .04em; }

.action-btn {
  width: 40px;
  height: 40px;
  border-color: #d7d2c9;
  border-radius: 10px;
  background: rgba(255,255,255,.72);
  box-shadow: none;
}

.action-btn:hover { transform: translateY(-2px); background: #fff; box-shadow: 0 8px 22px rgba(19,29,46,.09); }
.social-letter { padding-top: 3px; }

.personal-bar {
  top: var(--header-height);
  background: rgba(244,241,235,.96);
  border-bottom: 1px solid rgba(180,174,163,.45);
  backdrop-filter: blur(14px);
}

.personal-scroll { min-height: 50px; gap: 2px; }
.personal-scroll a {
  padding: 8px 13px;
  border-radius: 8px;
  background: transparent;
  color: #566071;
  font-size: 12px;
  font-weight: 750;
}

.personal-scroll a:hover,
.personal-scroll a.active { background: var(--dark); color: #fff; }
.personal-scroll .personal-label { color: var(--brand-dark); background: transparent; }

/* Layout */
.main-content { margin: 30px auto 68px; }
.portal-grid { grid-template-columns: minmax(0,1fr) 310px; gap: 28px; }
.home-stream { gap: 22px; }
.lead-grid { grid-template-columns: minmax(0,1fr) 330px; gap: 18px; }

.card,
.panel {
  background: var(--paper);
  border-color: rgba(187,180,169,.62);
  border-radius: 18px;
  box-shadow: var(--shadow-soft);
}

.card { transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition); }
.card:hover { transform: translateY(-4px); border-color: rgba(76,159,225,.42); box-shadow: var(--shadow); }
.panel { padding: 20px; }
.panel h2, .mini-card-title { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; }

/* Lead editorial area */
.hero-slider {
  min-height: 500px;
  border-radius: 20px;
  background: var(--dark);
  box-shadow: 0 28px 80px rgba(16,26,43,.22);
}

.slide::after { background: linear-gradient(to top, rgba(8,14,25,.94) 0, rgba(8,14,25,.50) 45%, rgba(8,14,25,.05) 78%); }
.slide img { transition: transform 8s ease; }
.slide.active img { transform: scale(1.025); }
.slide-content { padding: 40px 42px; }
.slide-content h1 {
  max-width: 850px;
  margin: 13px 0 20px;
  font: 400 clamp(32px, 3.2vw, 54px)/.99 var(--serif);
  letter-spacing: -.025em;
  text-shadow: 0 2px 24px rgba(0,0,0,.38);
}

.tag {
  padding: 6px 9px 5px;
  border-radius: 5px;
  background: var(--brand-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .12em;
}

.slider-dots { left: 42px; bottom: 23px; }
.dot { height: 3px; width: 14px; border-radius: 1px; }
.dot.active { width: 36px; }
.slider-controls { right: 24px; bottom: 21px; }
.slider-btn { width: 40px; height: 40px; border-radius: 10px; transition: background var(--transition); }
.slider-btn:hover { background: #fff; color: var(--dark); }

.lead-today-panel { min-height: 500px; padding: 22px; }
.today-panel h2 { margin-bottom: 14px; font: 400 28px/1 var(--serif); }
.today-list-with-thumbs { gap: 0; }
.today-item {
  grid-template-columns: 78px minmax(0,1fr);
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.today-item:first-child { border-top: 0; padding-top: 3px; }
.today-item:hover, .today-item:has(.today-thumb.active) { background: transparent; box-shadow: none; }
.today-thumb { width: 78px; height: 58px; border-radius: 8px; overflow: hidden; opacity: .82; }
.today-thumb.active { outline: 2px solid var(--brand); outline-offset: 2px; opacity: 1; }
.today-thumb.active::after { display: none; }
.today-thumb img { transition: transform var(--transition); }
.today-item:hover img { transform: scale(1.05); }
.today-info { gap: 4px; }
.today-date-inline { color: var(--brand-dark); font-size: 9px; font-weight: 800; letter-spacing: .06em; }
.today-title { font-size: 12px; line-height: 1.28; font-weight: 800; }

/* Home story modules */
.mosaic-grid { gap: 18px; }
.content-focus-grid { grid-template-columns: minmax(0,1.14fr) minmax(300px,.86fr); }
.story-large-img { overflow: hidden; }
.story-large-img img, .story-large img { aspect-ratio: 16/9; transition: transform .55s cubic-bezier(.22,1,.36,1); }
.story-large:hover .story-large-img img { transform: scale(1.025); }
.story-body { padding: 20px 22px 23px; }
.story-kicker { gap: 10px; margin-bottom: 10px; }
.story-date { font-size: 10px; letter-spacing: .03em; }
.story-body h3 { margin: 0 0 9px; font: 400 28px/1.08 var(--serif); letter-spacing: -.018em; }
.story-body h3 a:hover { color: var(--brand-dark); }
.story-body p { font-size: 13px; line-height: 1.6; }

.mini-list-card { padding: 20px; }
.mini-card-title { padding-bottom: 12px; margin-bottom: 2px; border-bottom: 2px solid var(--dark); font-size: 26px; }
.mini-items { gap: 0; }
.mini-item {
  padding: 12px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.mini-item:first-child { border-top: 0; }
.mini-item:hover { transform: none; box-shadow: none; background: transparent; }
.thumb-list-item { grid-template-columns: 78px minmax(0,1fr); gap: 12px; }
.list-thumb { width: 78px; height: 60px; border-radius: 8px; }
.list-info small { color: var(--brand-dark); font-size: 9px; letter-spacing: .05em; }
.mini-item strong, .list-info strong { font-size: 12px; line-height: 1.33; font-weight: 800; }
.obituary-info { font-size: 10px; line-height: 1.35; }

/* Right rail */
.right-rail { top: 157px; gap: 18px; }
.right-rail .panel { box-shadow: none; }
.popular-card-list { gap: 0; }
.popular-card-item {
  grid-template-columns: 84px minmax(0,1fr);
  padding: 11px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.popular-card-item:first-child { border-top: 0; }
.popular-card-item:hover { transform: none; box-shadow: none; background: transparent; }
.popular-thumb { width: 84px; height: 62px; border-radius: 8px; }
.popular-info strong { font-size: 12px; line-height: 1.32; font-weight: 800; }
.popular-info span, .popular-card-item .popular-date-inline { font-size: 9px; color: var(--brand-dark); }
.popular-tabs { border-bottom: 1px solid var(--line); }
.popular-tab { border-radius: 6px 6px 0 0; font-size: 10px; letter-spacing: .04em; }

.pills { gap: 6px; }
.pills a, .archive-right-rail .pills a {
  padding: 7px 10px;
  border-radius: 6px;
  border-color: var(--line);
  background: transparent;
  font-size: 11px;
  font-weight: 750;
}
.pills a:hover, .archive-right-rail .pills a:hover { color: #fff; background: var(--dark); border-color: var(--dark); }

/* Article */
.inner-portal-grid { grid-template-columns: minmax(0,1fr) 310px; }
.inner-post-panel { border-radius: 20px; }
.inner-post-header { padding: 48px 9% 32px; }
.inner-post-header h1 {
  max-width: 920px;
  font: 400 clamp(40px,5vw,72px)/.98 var(--serif);
  letter-spacing: -.025em;
}
.inner-post-date { font-size: 11px; letter-spacing: .05em; }
.inner-featured-image { margin: 0 4%; border-radius: 14px; }
.inner-featured-image img { max-height: 690px; }
.inner-post-content {
  max-width: 850px;
  margin: 0 auto;
  padding: 44px 34px 58px;
  color: #222c3b;
  font-size: 18px;
  line-height: 1.82;
  letter-spacing: -.008em;
}
.inner-post-content > p:first-child { font-size: 21px; line-height: 1.65; color: #354052; }
.inner-post-content h2, .inner-post-content h3 { font-family: var(--serif); font-weight: 400; letter-spacing: -.015em; }
.inner-post-content h2 { font-size: 34px; }
.inner-post-content h3 { font-size: 28px; }
.inner-post-content a { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.inner-post-content img { border-radius: 12px; }
.wp-caption, .suzivo-video-wrap { border-radius: 12px; }
blockquote { font: 400 23px/1.55 var(--serif); border-left-color: var(--brand); border-radius: 12px; }

/* Comments and engagement */
.suzivo-reaction-panel, .suzivo-comments-panel { border-radius: 18px; border-color: var(--line); box-shadow: var(--shadow-soft); }
.suzivo-reaction-title, .suzivo-comments-head h2 { font-family: var(--serif); font-weight: 400; }
.suzivo-reaction-btn, .comment-submit-btn { border-radius: 8px; }
.suzivo-comment { border-radius: 12px; background: rgba(255,255,255,.48); }

/* Archives, search and utility pages */
.archive-title-row { margin-bottom: 10px; padding: 4px 0 8px; border-bottom: 2px solid var(--dark); }
.archive-title-row h1 { font: 400 46px/1 var(--serif); letter-spacing: -.02em; }
.page-indicator { font-family: var(--sans); font-size: 12px; font-weight: 650; color: var(--muted); letter-spacing: 0; }
.archive-news-grid { gap: 20px; }
.archive-news-card { border-radius: 16px; }
.archive-news-image img { aspect-ratio: 16/9.5; }
.archive-news-body h3 { font-size: 25px; }
.archive-pagination .page-numbers, .archive-top-pager a, .archive-top-pager span.is-disabled { border-radius: 8px; box-shadow: none; }
.archive-pagination .page-numbers.current, .archive-pagination .page-numbers:hover { background: var(--dark); border-color: var(--dark); }
.search-box-panel { border-radius: 14px; }
.search-page-form input, .search-page-form button { border-radius: 8px; }

/* Obituaries */
.obituary-grid { gap: 20px; }
.obituary-preview-btn { border-radius: 14px; background: #161b22; box-shadow: var(--shadow-soft); }
.obituary-name { font-family: var(--serif); font-size: 24px; font-weight: 400; }
.obituary-search-form input, .obituary-search-actions button, .obituary-search-actions a { border-radius: 8px; }

/* Footer */
.site-footer {
  margin-top: 0;
  background: #101a2b;
  border-top: 0;
  color: rgba(255,255,255,.76);
}
.footer-inner { padding-top: 58px; }
.footer-top { gap: 70px; }
.footer-logo { color: #fff; font: 400 28px/1 var(--serif); }
.footer-logo img { background: var(--brand); border-radius: 4px; transform: scale(1.02); }
.footer-brand p { color: rgba(255,255,255,.56); line-height: 1.7; }
.footer-signature { display: inline-block; margin-top: 15px; color: var(--brand); font: italic 400 19px/1.2 var(--serif); }
.footer-col h3 { color: #fff; font-family: var(--serif); font-weight: 400; letter-spacing: 0; text-transform: none; font-size: 17px; }
.footer-col a { color: rgba(255,255,255,.58); }
.footer-col a:hover { color: #fff; transform: translateX(3px); }
.footer-bottom { border-top-color: rgba(255,255,255,.10); }
.footer-copy { color: rgba(255,255,255,.42); }
.footer-social-link, .scroll-top-btn { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.06); border-radius: 8px; }
.footer-social-link:hover, .scroll-top-btn:hover { background: var(--brand); border-color: var(--brand); }

/* Dark mode stays editorial, rather than pure black */
body.dark {
  --bg: #0d1420;
  --paper: #151e2d;
  --dark: #f4f1eb;
  --text: #edf1f5;
  --soft: #bcc4ce;
  --muted: #929dac;
  --line: #293547;
  --brand-soft: rgba(76,159,225,.13);
  background: var(--bg);
}
body.dark .top-header, body.dark .personal-bar { background: rgba(13,20,32,.94); }
body.dark .su-sidebar { background: #080e18; }
body.dark .header-wordmark strong, body.dark .header-location b { color: var(--text); }
body.dark .search-wrap, body.dark .action-btn { background: rgba(255,255,255,.04); border-color: var(--line); }
body.dark .search-wrap:focus-within { background: rgba(255,255,255,.07); }
body.dark .inner-post-content { color: var(--text); }
body.dark .inner-post-content > p:first-child { color: var(--soft); }
body.dark .card, body.dark .panel { border-color: var(--line); }
body.dark .suzivo-comment { background: rgba(255,255,255,.035); }
body.dark .site-footer { background: #080e18; }

/* Responsive */
@media (max-width: 1380px) {
  .portal-grid, .inner-portal-grid { grid-template-columns: minmax(0,1fr) 292px; gap: 22px; }
  .lead-grid { grid-template-columns: minmax(0,1fr) 310px; }
  .header-location { display: none; }
}

@media (max-width: 1180px) {
  .portal-grid, .inner-portal-grid { grid-template-columns: 1fr; }
  .right-rail { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .inner-right-rail { grid-template-columns: repeat(2,minmax(0,1fr)); }
}

@media (max-width: 1050px) {
  .su-sidebar { width: var(--sidebar-expanded); }
  body.sidebar-open .su-sidebar { transform: translateX(0); }
  .mobile-menu-btn { display: grid; color: var(--text); background: transparent !important; }
  .header-logo { margin-right: auto; }
  .search-wrap { margin-left: 0; max-width: 470px; }
}

@media (max-width: 860px) {
  :root { --header-height: 72px; }
  .top-header-inner, .personal-scroll, .main-content { width: min(100% - 28px,var(--container)); }
  .header-wordmark small { display: none; }
  .header-logo-mark { width: 38px; height: 42px; }
  .header-logo img, .header-logo-mark img { width: 38px; height: 38px; }
  .header-wordmark strong { font-size: 24px; }
  .search-wrap { flex: 0 1 290px; }
  .desktop-social { display: none; }
  .lead-grid { grid-template-columns: 1fr; }
  .hero-slider { min-height: 490px; }
  .lead-today-panel { min-height: auto; }
  .today-list-with-thumbs { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 18px; }
  .today-item:nth-child(2) { border-top: 0; padding-top: 3px; }
  .content-focus-grid { grid-template-columns: 1fr; }
  .mini-items { grid-template-columns: repeat(2,minmax(0,1fr)); column-gap: 18px; }
  .mini-item:nth-child(2) { border-top: 0; }
  .footer-top { grid-template-columns: 1fr; gap: 36px; }
}

@media (max-width: 640px) {
  :root { --header-height: 66px; }
  .top-header-inner, .personal-scroll, .main-content { width: min(100% - 20px,var(--container)); }
  .main-content { margin-top: 14px; margin-bottom: 14px; }
  .mobile-menu-btn { width: 40px; height: 40px; padding: 0; }
  .mobile-menu-btn .side-hamb-mark { width: 40px; height: 40px; }
  .header-logo { height: 46px; gap: 7px; }
  .header-logo-mark { width: 34px; height: 38px; }
  .header-logo img, .header-logo-mark img { width: 34px; height: 34px; }
  .header-wordmark strong { font-size: 21px; }
  .search-wrap { order: 3; flex: 0 0 40px; width: 40px; height: 40px; padding: 0; border: 0; background: transparent; }
  .search-wrap input { position: fixed; left: 10px; right: 10px; top: 70px; z-index: 80; width: calc(100% - 20px); height: 46px; padding: 0 14px; border: 1px solid var(--line); border-radius: 8px; background: var(--paper); box-shadow: var(--shadow); opacity: 0; pointer-events: none; transform: translateY(-8px); transition: var(--transition); }
  .search-wrap:focus-within input,
  .search-wrap.mobile-search-open input { opacity: 1; pointer-events: auto; transform: translateY(0); }
  .search-submit { width: 40px; height: 40px; }
  .header-actions { gap: 5px; }
  .action-btn { width: 38px; height: 38px; }
  .personal-scroll { min-height: 44px; }
  .personal-scroll a { padding: 7px 10px; font-size: 11px; }
  .portal-grid { gap: 9px; }
  .hero-slider { min-height: 420px; border-radius: 14px; }
  .slide-content { padding: 24px 22px 52px; }
  .slide-content h1 { font-size: 34px; line-height: 1.02; }
  .slider-dots { left: 22px; bottom: 20px; }
  .slider-controls { right: 16px; bottom: 14px; }
  .slider-btn { width: 36px; height: 36px; }
  .lead-today-panel { padding: 18px; }
  .today-list-with-thumbs, .mini-items { grid-template-columns: 1fr; }
  .today-item:nth-child(2), .mini-item:nth-child(2) { border-top: 1px solid var(--line); padding-top: 10px; }
  .today-item { grid-template-columns: 92px minmax(0,1fr); }
  .today-thumb { width: 92px; height: 66px; }
  .today-title { font-size: 13px; }
  .mosaic-grid, .split-row, .archive-news-grid { grid-template-columns: 1fr; }
  .story-body { padding: 17px 18px 20px; }
  .story-body h3 { font-size: 25px; }
  .mini-list-card { padding: 18px; }
  .right-rail, .inner-right-rail { grid-template-columns: 1fr; }
  .inner-post-panel { border-radius: 14px;         padding: 6px;}
  .inner-post-header { padding: 28px 20px 22px; }
  .inner-post-header h1 { font-size: 39px; }
  .inner-featured-image { margin: 0; border-radius: 0; }
  .inner-post-content { padding: 28px 20px 38px; font-size: 17px; line-height: 1.75; }
  .inner-post-content > p:first-child { font-size: 19px; }
  .inner-post-content h2 { font-size: 29px; }
  .archive-title-row h1 { font-size: 34px; }
  .archive-news-image img { aspect-ratio: 16/9; }
  .footer-inner { padding-top: 42px; }
  .footer-links { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 28px 20px; }
  .footer-bottom { align-items: flex-start; }
}

@media (max-width: 390px) {
  .header-wordmark { display: none; }
  .hero-slider { min-height: 390px; }
  .slide-content h1 { font-size: 31px; }
  .footer-links { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

/* =========================================================
   V2 — CBC-style editorial packages + YouTube-style cards
   ========================================================= */

.editorial-home {
  display: grid;
  gap: 38px;
}

.editorial-section {
  min-width: 0;
  padding-top: 2px;
}

.editorial-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 0 0 11px;
  border-bottom: 3px solid var(--dark);
}

.editorial-heading > div { display: grid; gap: 2px; }
.editorial-eyebrow {
  color: var(--brand-dark);
  font-size: 9px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
}

.editorial-heading h1,
.editorial-heading h2 {
  margin: 0;
  font-family: var(--sans);
  font-size: 27px;
  line-height: 1.08;
  font-weight: 800;
  letter-spacing: -.045em;
}

.editorial-heading > a {
  flex: 0 0 auto;
  padding-bottom: 2px;
  color: var(--brand-dark);
  font-size: 11px;
  font-weight: 800;
}

.latest-package {
  display: grid;
  grid-template-columns: minmax(0, 1.26fr) minmax(370px, .74fr);
  gap: 18px;
  align-items: start;
}

.package-lead {
  min-width: 0;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
}

.package-lead-image {
  position: relative;
  display: block;
  overflow: hidden;
  background: #d9dde2;
}

.package-lead-image img {
  width: 100%;
  aspect-ratio: 16 / 8.7;
  object-fit: cover;
  transition: transform .45s ease;
}

.package-lead:hover .package-lead-image img { transform: scale(1.015); }
.package-lead-copy { padding: 18px 20px 20px; }

.story-section-label {
  color: var(--brand-dark);
  font-size: 9px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.package-lead-copy h2 {
  max-width: 820px;
  margin: 6px 0 7px;
  font-family: var(--sans);
  font-size: clamp(25px, 2.25vw, 36px);
  line-height: 1.06;
  font-weight: 800;
  letter-spacing: -.045em;
}

.package-lead-copy p,
.category-lead-copy p {
  margin: 0 0 12px;
  color: var(--soft);
  font-size: 13px;
  line-height: 1.52;
}

.story-stats {
  display: block;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.35;
  font-weight: 650;
}

.package-supporting {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px 14px;
}

.yt-story-card { min-width: 0; }
.yt-story-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  border-radius: 10px;
  background: #d9dde2;
}

.yt-story-thumb img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  transition: transform .34s ease, filter .34s ease;
}

.yt-story-card:hover .yt-story-thumb img {
  transform: scale(1.025);
  filter: saturate(1.08);
}

.thumb-category {
  position: absolute;
  left: 7px;
  bottom: 7px;
  max-width: calc(100% - 14px);
  padding: 4px 6px;
  border-radius: 4px;
  overflow: hidden;
  color: #fff;
  background: rgba(8, 14, 24, .84);
  font-size: 8px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .06em;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  backdrop-filter: blur(6px);
}

.yt-story-info { padding: 8px 2px 0; }
.yt-story-info h3 {
  display: -webkit-box;
  margin: 0 0 6px;
  overflow: hidden;
  font-family: var(--sans);
  font-size: 13px;
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.025em;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.yt-story-info h3 a:hover,
.package-lead-copy h2 a:hover,
.category-lead-copy h3 a:hover { color: var(--brand-dark); }

.category-package-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(400px, .88fr);
  gap: 18px;
  align-items: start;
}

.category-lead {
  display: grid;
  grid-template-columns: minmax(260px, .98fr) minmax(230px, 1.02fr);
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.category-lead-image { display: block; min-height: 100%; overflow: hidden; }
.category-lead-image img {
  width: 100%;
  height: 100%;
  min-height: 235px;
  object-fit: cover;
  transition: transform .4s ease;
}

.category-lead:hover .category-lead-image img { transform: scale(1.015); }
.category-lead-copy { align-self: center; padding: 22px; }
.category-lead-copy h3 {
  margin: 0 0 9px;
  font-family: var(--sans);
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -.04em;
}

.category-supporting {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 13px;
}

.yt-story-card.compact .yt-story-info h3 { font-size: 12px; }
.yt-story-card.compact .story-stats { font-size: 9px; }

.accent-history .editorial-heading { border-bottom-color: #716052; }
.accent-curious .editorial-heading { border-bottom-color: var(--brand-dark); }
.accent-advice .editorial-heading { border-bottom-color: #39715a; }
.accent-food .editorial-heading { border-bottom-color: #a76538; }

.obituary-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
}

.obituary-strip-card {
  display: grid;
  grid-template-columns: 76px minmax(0, 1fr);
  gap: 11px;
  min-width: 0;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--paper);
  transition: transform .2s ease, border-color .2s ease;
}

.obituary-strip-card:hover { transform: translateY(-2px); border-color: var(--brand); }
.obituary-strip-thumb { overflow: hidden; border-radius: 7px; background: #222; }
.obituary-strip-thumb img { width: 76px; height: 72px; object-fit: cover; }
.obituary-strip-card > span:last-child { display: grid; align-content: center; gap: 2px; min-width: 0; }
.obituary-strip-card strong { font-size: 11px; line-height: 1.25; }
.obituary-strip-card small { color: var(--muted); font-size: 9px; }
.obituary-strip-card em { color: var(--soft); font-size: 9px; line-height: 1.3; font-style: normal; }

/* The right rail is intentionally quick and video-feed-like. */
.editorial-right-rail .popular-panel h2 { margin-bottom: 10px; font-family: var(--sans); font-size: 21px; font-weight: 800; letter-spacing: -.035em; }
.editorial-right-rail .popular-card-item {
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 10px;
}
.editorial-right-rail .popular-thumb { width: 112px; height: 64px; border-radius: 8px; }
.editorial-right-rail .popular-info strong { font-size: 11px; line-height: 1.27; }
.editorial-right-rail .popular-info span { font-size: 8px; }

/* Article information bar: publication, views and reading time. */
.inner-post-header {
  padding: 34px 7% 24px;
}

.inner-post-header h1 {
  max-width: 900px;
  font-family: var(--sans);
  font-size: clamp(34px, 3.8vw, 54px);
  line-height: 1.035;
  font-weight: 800;
  letter-spacing: -.05em;
}

.article-data-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0;
  margin-top: 10px;
  padding-top: 15px;
  border-top: 1px solid var(--line);
}

.article-data-bar > span {
  display: grid;
  gap: 2px;
  min-width: 112px;
  padding: 0 20px;
  border-left: 1px solid var(--line);
}

.article-data-bar > span:first-child { padding-left: 0; border-left: 0; }
.article-data-bar small {
  color: var(--muted);
  font-size: 8px;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.article-data-bar time,
.article-data-bar strong {
  color: var(--text);
  font-size: 11px;
  font-weight: 750;
}

/* Archive cards follow the same thumbnail-first grammar. */
.archive-news-card {
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}
.archive-news-card:hover { transform: none; border-color: transparent; box-shadow: none; }
.archive-news-image { border-radius: 10px; }
.archive-news-body { padding: 10px 2px 4px; }
.archive-news-body h3 { font-family: var(--sans); font-size: 19px; line-height: 1.15; font-weight: 800; letter-spacing: -.035em; }
.archive-news-body p { font-size: 12px; }

@media (max-width: 1320px) {
  .latest-package { grid-template-columns: minmax(0, 1.12fr) minmax(340px, .88fr); }
  .category-package-grid { grid-template-columns: 1fr; }
  .category-supporting { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .obituary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 960px) {
  .editorial-home { gap: 32px; }
  .latest-package { grid-template-columns: 1fr; }
  .package-supporting { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .package-lead-image img { aspect-ratio: 16 / 8; }
  .category-lead { grid-template-columns: minmax(260px, .9fr) minmax(260px, 1.1fr); }
}

@media (max-width: 760px) {
  .editorial-home { gap: 9px; }
  .editorial-heading { margin-bottom: 12px; border-bottom-width: 2px; }
  .editorial-heading h1,
  .editorial-heading h2 { font-size: 23px; }
  .latest-package { gap: 9px; }
  .package-lead { border-radius: 11px; }
  .package-lead-copy { padding: 14px 15px 16px; }
  .package-lead-copy h2 { font-size: 26px; }
  .package-lead-copy p { display: none; }
  .package-supporting {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0;
  }
  .package-supporting .yt-story-card,
  .category-supporting .yt-story-card {
    display: grid;
    grid-template-columns: 132px minmax(0, 1fr);
    gap: 11px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
  }
  .package-supporting .yt-story-card:first-child,
  .category-supporting .yt-story-card:first-child { border-top: 0; }
  .yt-story-thumb { border-radius: 7px; }
  .yt-story-info { align-self: center; padding: 0; }
  .yt-story-info h3,
  .yt-story-card.compact .yt-story-info h3 { font-size: 13px; line-height: 1.28; }
  .thumb-category { display: none; }
  .category-package-grid { gap: 4px; }
  .category-lead {
    display: block;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  .category-lead-image { border-radius: 10px; }
  .category-lead-image img { min-height: 0; aspect-ratio: 16 / 9; }
  .category-lead-copy { padding: 12px 1px 14px; }
  .category-lead-copy h3 { font-size: 22px; }
  .category-lead-copy p { display: none; }
  .category-supporting { display: grid; grid-template-columns: 1fr; gap: 0; }
  .obituary-strip { grid-template-columns: 1fr; gap: 8px; }
  .obituary-strip-card { grid-template-columns: 86px minmax(0, 1fr); }
  .obituary-strip-thumb img { width: 86px; }
  .inner-post-header { padding: 26px 19px 19px; }
  .inner-post-header h1 { font-size: 28px; line-height: 1.08; }
  .article-data-bar { gap: 10px 0; }
  .article-data-bar > span { min-width: auto; padding: 0 12px; }
  .article-data-bar > span:first-child { flex: 1 1 100%; padding: 0 0 10px; border-bottom: 1px solid var(--line); }
}

/* =========================================================
   V4 — motion fix, balanced lead and restrained side rail
   ========================================================= */

.header-logo-mark {
  background: transparent;
  box-shadow: none;
}

/* The lead stretches to the exact height of the 2 x 3 story grid. */
.latest-package {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, .75fr);
  align-items: stretch;
}

.package-lead {
  display: flex;
  flex-direction: column;
  height: 100%;
}

.package-lead-image {
  flex: 1 1 auto;
  min-height: 340px;
}

.package-lead-image img {
  width: 100%;
  height: 100%;
  min-height: 340px;
  aspect-ratio: auto;
}

.package-supporting {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  grid-template-rows: repeat(3, minmax(0, 1fr));
  height: 100%;
  align-content: stretch;
}

/* Only the image scales. The card no longer moves out from under the cursor. */
.yt-story-card:hover,
.package-lead:hover,
.category-lead:hover,
.archive-news-card:hover,
.popular-card-item:hover,
.obituary-strip-card:hover {
  transform: none;
}

.package-lead-image img,
.category-lead-image img,
.yt-story-thumb img,
.archive-news-image img,
.popular-thumb img,
.obituary-strip-thumb img {
  transform: translateZ(0) scale(1);
  transform-origin: 50% 50%;
  backface-visibility: hidden;
  transition:
    transform .58s cubic-bezier(.2,.72,.24,1),
    filter .58s cubic-bezier(.2,.72,.24,1) !important;
}

.package-lead-image:hover img,
.category-lead-image:hover img,
.yt-story-thumb:hover img,
.archive-news-image:hover img,
.popular-thumb:hover img,
.obituary-strip-thumb:hover img {
  transform: translateZ(0) scale(1.045);
  filter: saturate(1.06) contrast(1.015);
}

/* Sidebar opens with a visible horizontal slide, not only a width change. */
.side-nav {
  transform: translateX(-4px);
  transition: transform .42s cubic-bezier(.2,.72,.24,1);
}

body.sidebar-open .side-nav { transform: translateX(0); }

.side-link-text,
.side-section-label,
.chevron {
  transform: translateX(-18px);
  transition:
    opacity .26s ease,
    transform .42s cubic-bezier(.2,.72,.24,1);
}

body.sidebar-open .side-link-text,
body.sidebar-open .side-section-label,
body.sidebar-open .chevron { transform: translateX(0); }

@media (max-width: 1050px) {
  .su-sidebar {
    transition: transform .42s cubic-bezier(.2,.72,.24,1), box-shadow .35s ease;
  }
  body.mobile-sidebar-open .su-sidebar { transform: translateX(0); }
}

/* Right sidebar: square editorial modules with properly anchored headings. */
.editorial-right-rail {
  gap: 10px;
}

.editorial-right-rail .panel {
  padding: 12px;
  border-radius: 6px;
  border-color: rgba(187,180,169,.72);
  box-shadow: none;
}

.editorial-right-rail .panel h2 {
  display: block;
  margin: 0 0 8px;
  padding: 0 0 8px 9px;
  border-bottom: 2px solid var(--dark);
  border-left: 3px solid var(--brand);
  color: var(--text);
  font-size: 16px;
  line-height: 1.05;
  font-weight: 700;
  letter-spacing: -.025em;
}

.editorial-right-rail .popular-tabs {
  gap: 0;
  border: 1px solid var(--line);
  border-radius: 4px;
  overflow: hidden;
}

.editorial-right-rail .popular-tab {
  border-radius: 0;
  border-left: 1px solid var(--line);
  background: transparent;
}

.editorial-right-rail .popular-tab:first-child { border-left: 0; }
.editorial-right-rail .popular-tab.active { background: var(--dark); color: var(--paper); }
.editorial-right-rail .popular-card-item { padding: 7px 0; }
.editorial-right-rail .popular-thumb { border-radius: 5px; }
.editorial-right-rail .pills a { border-radius: 4px; }

/* Obituary artwork is shown complete; unused area stays respectfully white. */
.obituary-strip-thumb {
  width: 100%;
  height: 92px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background: #fff;
}

.obituary-strip-thumb img {
  width: 100%;
  height: 100%;
  max-width: 100%;
  object-fit: contain;
  background: #fff;
}

@media (max-width: 1320px) {
  .latest-package {
    grid-template-columns: minmax(0, 1.2fr) minmax(390px, .8fr);
  }
}

@media (max-width: 1100px) {
  .latest-package { grid-template-columns: 1fr; }
  .package-lead-image img { min-height: 0; aspect-ratio: 16 / 8.4; }
  .package-supporting {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    grid-template-rows: repeat(2, auto);
  }
}

@media (max-width: 760px) {
  .package-lead-image { min-height: 0; }
  .package-lead-image img { min-height: 0; aspect-ratio: 16 / 9; }
  .package-supporting {
    grid-template-columns: 1fr;
    grid-template-rows: none;
  }
  .editorial-right-rail .panel { border-radius: 5px; }
}

@media (max-width: 420px) {
  .package-supporting .yt-story-card,
  .category-supporting .yt-story-card { grid-template-columns: 118px minmax(0, 1fr); }
  .editorial-heading > a { font-size: 10px; }
}

/* =========================================================
   V3 — original typography, richer motion and final order
   ========================================================= */

body,
select, option, button, input, textarea {
  font-family: var(--sans);
}

/* Section title = icon + coloured title, without a pre-title label. */
.editorial-heading > div {
  display: flex;
  align-items: center;
  gap: 10px;
}

.editorial-eyebrow { display: none; }

.section-icon {
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: #fff;
  background: var(--brand-dark);
  box-shadow: 0 7px 16px rgba(22, 106, 168, .18);
}

.section-icon svg { width: 18px; height: 18px; fill: currentColor; }
.section-icon-latest { background: #176aa8; }
.section-icon-advice { background: #39715a; box-shadow: 0 7px 16px rgba(57,113,90,.18); }
.section-icon-spark { background: #75589d; box-shadow: 0 7px 16px rgba(117,88,157,.18); }
.section-icon-food { background: #a76538; box-shadow: 0 7px 16px rgba(167,101,56,.18); }
.section-icon-history { background: #716052; box-shadow: 0 7px 16px rgba(113,96,82,.18); }
.section-icon-memory { background: #5f6570; box-shadow: none; }

.latest-editorial .editorial-heading h1 { color: #176aa8; }
.accent-advice .editorial-heading h2 { color: #39715a; }
.accent-curious .editorial-heading h2 { color: #75589d; }
.accent-food .editorial-heading h2 { color: #a76538; }
.accent-history .editorial-heading h2 { color: #716052; }

/* Six supporting stories fit beside the main story in two rows. */
.latest-package {
  grid-template-columns: minmax(0, 1.05fr) minmax(430px, .95fr);
}

.package-supporting {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px 12px;
}

.package-supporting .yt-story-info h3 {
  font-size: 12px;
  line-height: 1.24;
}

.package-supporting .story-stats { font-size: 9px; }

/* Smooth scale-in and scale-out on every editorial image. */
.package-lead-image img,
.category-lead-image img,
.yt-story-thumb img,
.archive-news-image img,
.popular-thumb img,
.obituary-strip-thumb img {
  transform: scale(1);
  transition:
    transform .42s cubic-bezier(.22,1,.36,1),
    filter .42s cubic-bezier(.22,1,.36,1);
  will-change: transform;
}

.package-lead:hover .package-lead-image img,
.category-lead:hover .category-lead-image img,
.yt-story-card:hover .yt-story-thumb img,
.archive-news-card:hover .archive-news-image img,
.popular-card-item:hover .popular-thumb img,
.obituary-strip-card:hover .obituary-strip-thumb img {
  transform: scale(1.045);
  filter: saturate(1.07) contrast(1.02);
}

.package-lead,
.category-lead,
.yt-story-card,
.archive-news-card,
.popular-card-item,
.obituary-strip-card {
  transition:
    transform .30s cubic-bezier(.22,1,.36,1),
    box-shadow .30s cubic-bezier(.22,1,.36,1),
    border-color .30s ease;
}

.yt-story-card:hover { transform: translateY(-3px); }
.package-lead:hover,
.category-lead:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(19,29,46,.09); }

/* Side menu: softer open/close, subtle movement and stagger. */
.su-sidebar {
  transition:
    width .38s cubic-bezier(.22,1,.36,1),
    transform .38s cubic-bezier(.22,1,.36,1),
    box-shadow .38s ease;
}

.su-shell { transition: padding-left .38s cubic-bezier(.22,1,.36,1); }

.side-logo-text,
.side-link-text,
.side-section-label,
.chevron {
  transition:
    opacity .24s ease,
    transform .34s cubic-bezier(.22,1,.36,1);
}

body.sidebar-open .side-link-text,
body.sidebar-open .side-section-label,
body.sidebar-open .chevron { transition-delay: .055s; }

.side-link { transition: color .24s ease, background .24s ease, transform .28s cubic-bezier(.22,1,.36,1); }
.side-link-icon { transition: color .24s ease, transform .34s cubic-bezier(.22,1,.36,1); }
.side-link:hover { transform: translateX(3px); }
.side-link:hover .side-link-icon { transform: scale(1.10); }
.side-menu-head .side-hamb-mark i { transition: transform .30s ease, width .30s ease, opacity .30s ease; }
body.sidebar-open .side-menu-head .side-hamb-mark i:nth-child(1) { transform: translateY(2px); width: 18px; }
body.sidebar-open .side-menu-head .side-hamb-mark i:nth-child(3) { transform: translateY(-2px); width: 18px; }

/* Tighter, cleaner right sidebar. */
.editorial-right-rail {
  gap: 12px;
  top: 151px;
}

.editorial-right-rail .panel { padding: 14px; border-radius: 14px; }
.editorial-right-rail .panel h2 { margin-bottom: 9px; font-size: 18px; }
.editorial-right-rail .popular-tabs { margin-bottom: 4px; }
.editorial-right-rail .popular-tab { padding: 7px 6px; font-size: 9px; }
.editorial-right-rail .popular-card-item {
  grid-template-columns: 102px minmax(0, 1fr);
  gap: 9px;
  padding: 8px 0;
}
.editorial-right-rail .popular-thumb { width: 102px; height: 58px; }
.editorial-right-rail .popular-info strong { font-size: 10.5px; line-height: 1.24; }
.editorial-right-rail .weather-panel { overflow: hidden; }
.editorial-right-rail .pills { gap: 5px; }
.editorial-right-rail .pills a { padding: 6px 8px; font-size: 10px; }

/* Obituaries: respectful, rounded dark field, 3 columns x 2 rows. */
.obituary-strip-section {
  padding: 22px;
  border-radius: 22px;
  color: #fff;
  background: #15171b;
  box-shadow: 0 20px 55px rgba(10,12,16,.20);
}

.obituary-strip-section .editorial-heading {
  border-bottom-color: rgba(255,255,255,.18);
}

.obituary-strip-section .editorial-heading h2 { color: #fff; }
.obituary-strip-section .editorial-heading > a { color: #a9cfee; }

.obituary-strip {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
}

.obituary-strip-card {
  grid-template-columns: 112px minmax(0, 1fr);
  min-height: 112px;
  padding: 10px;
  border-color: rgba(255,255,255,.10);
  border-radius: 14px;
  color: #fff;
  background: rgba(255,255,255,.055);
}

.obituary-strip-card:hover {
  border-color: rgba(255,255,255,.25);
  background: rgba(255,255,255,.085);
}

.obituary-strip-thumb { border-radius: 10px; background: #fff; }
.obituary-strip-thumb img { width: 112px; height: 92px; object-fit: cover; }
.obituary-strip-card strong { font-size: 13px; color: #fff; }
.obituary-strip-card small { color: #b9bec7; font-size: 10px; }
.obituary-strip-card em { color: #e2e5ea; font-size: 10px; }

@media (max-width: 1320px) {
  .latest-package { grid-template-columns: minmax(0, 1fr) minmax(400px, .92fr); }
  .obituary-strip-card { grid-template-columns: 96px minmax(0, 1fr); }
  .obituary-strip-thumb img { width: 96px; height: 88px; }
}

@media (max-width: 1100px) {
  .latest-package { grid-template-columns: 1fr; }
  .package-supporting { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .obituary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .section-icon { flex-basis: 30px; width: 30px; height: 30px; border-radius: 8px; }
  .section-icon svg { width: 16px; height: 16px; }
  .package-supporting { grid-template-columns: 1fr; }
  .yt-story-card:hover { transform: none; }
  .obituary-strip-section { padding: 9px; border-radius: 6px; }
  .obituary-strip { grid-template-columns: 1fr; }
  .obituary-strip-card { grid-template-columns: 106px minmax(0, 1fr); }
  .obituary-strip-thumb img { width: 106px; height: 92px; }
}

/* V4 final overrides — kept last intentionally. */
.header-logo-mark { background: transparent; box-shadow: none; }

.latest-package {
  grid-template-columns: minmax(0, 1.45fr) minmax(420px, .75fr);
  align-items: stretch;
}
.package-lead { display:flex; flex-direction:column; height:100%; }
.package-lead-image { flex:1 1 auto; min-height:340px; }
.package-lead-image img { width:100%; height:100%; min-height:340px; aspect-ratio:auto; }
.package-supporting {
  grid-template-columns:repeat(2,minmax(0,1fr));
  grid-template-rows:repeat(3,minmax(0,1fr));
  height:100%;
  align-content:stretch;
}

.yt-story-card:hover,
.package-lead:hover,
.category-lead:hover,
.archive-news-card:hover,
.popular-card-item:hover,
.obituary-strip-card:hover { transform:none; }

.package-lead-image img,
.category-lead-image img,
.yt-story-thumb img,
.archive-news-image img,
.popular-thumb img,
.obituary-strip-thumb img {
  transform:translateZ(0) scale(1);
  transform-origin:center;
  backface-visibility:hidden;
  transition:transform .58s cubic-bezier(.2,.72,.24,1), filter .58s cubic-bezier(.2,.72,.24,1) !important;
}
.package-lead-image:hover img,
.category-lead-image:hover img,
.yt-story-thumb:hover img,
.archive-news-image:hover img,
.popular-thumb:hover img,
.obituary-strip-thumb:hover img {
  transform:translateZ(0) scale(1.045);
  filter:saturate(1.06) contrast(1.015);
}

.side-nav { transform:translateX(-4px); transition:transform .42s cubic-bezier(.2,.72,.24,1); }
body.sidebar-open .side-nav { transform:translateX(0); }
.side-link-text,.side-section-label,.chevron {
  transform:translateX(-18px);
  transition:opacity .26s ease, transform .42s cubic-bezier(.2,.72,.24,1);
}
body.sidebar-open .side-link-text,
body.sidebar-open .side-section-label,
body.sidebar-open .chevron { transform:translateX(0); }

.editorial-right-rail { gap:10px; }
.editorial-right-rail .panel {
  padding:12px;
  border-radius:6px;
  border-color:rgba(187,180,169,.72);
  box-shadow:none;
}
.editorial-right-rail .panel h2 {
  display:block;
  margin:0 0 8px;
  padding:0 0 8px 9px;
  border-bottom:2px solid var(--dark);
  border-left:3px solid var(--brand);
  color:var(--text);
  font-size:16px;
  line-height:1.05;
  font-weight:700;
  letter-spacing:-.025em;
}
.editorial-right-rail .popular-tabs {
  gap:0;
  border:1px solid var(--line);
  border-radius:4px;
  overflow:hidden;
}
.editorial-right-rail .popular-tab {
  border-radius:0;
  border-left:1px solid var(--line);
  background:transparent;
}
.editorial-right-rail .popular-tab:first-child { border-left:0; }
.editorial-right-rail .popular-tab.active { background:var(--dark); color:var(--paper); }
.editorial-right-rail .popular-card-item { padding:7px 0; }
.editorial-right-rail .popular-thumb { border-radius:5px; }
.editorial-right-rail .pills a { border-radius:4px; }

.obituary-strip-thumb {
  width:100%;
  height:92px;
  display:flex;
  align-items:center;
  justify-content:center;
  overflow:hidden;
  background:#fff;
}
.obituary-strip-thumb img {
  width:100%;
  height:100%;
  max-width:100%;
  object-fit:contain;
  background:#fff;
}

@media (max-width:1320px) {
  .latest-package { grid-template-columns:minmax(0,1.2fr) minmax(390px,.8fr); }
}
@media (max-width:1100px) {
  .latest-package { grid-template-columns:1fr; }
  .package-lead-image img { min-height:0; aspect-ratio:16/8.4; }
  .package-supporting {
    grid-template-columns:repeat(3,minmax(0,1fr));
    grid-template-rows:repeat(2,auto);
  }
}
@media (max-width:1050px) {
  .su-sidebar { transition:transform .42s cubic-bezier(.2,.72,.24,1), box-shadow .35s ease; }
  body.mobile-sidebar-open .su-sidebar { transform:translateX(0); }
}
@media (max-width:760px) {
  .package-lead-image { min-height:0; }
  .package-lead-image img { min-height:0; aspect-ratio:16/9; }
  .package-supporting { grid-template-columns:1fr; grid-template-rows:none; }
  .editorial-right-rail .panel { border-radius:5px; }
}

/* V5 — shared icons, category colour language and final proportions. */
.editorial-right-rail .panel h2.panel-title-with-icon {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:30px;
  padding:0 0 8px;
  border-left:0;
  border-bottom-color:color-mix(in srgb, var(--panel-accent, var(--brand)) 62%, #d9d4cc);
}

.panel-mini-icon,
.archive-title-icon {
  display:inline-flex;
  flex:0 0 auto;
  align-items:center;
  justify-content:center;
  color:#fff;
  background:var(--panel-accent, var(--brand));
}

.panel-mini-icon {
  width:25px;
  height:25px;
  border-radius:7px;
  box-shadow:0 4px 12px color-mix(in srgb, var(--panel-accent, var(--brand)) 22%, transparent);
}

.panel-mini-icon svg,
.archive-title-icon svg {
  width:15px;
  height:15px;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.weather-panel { --panel-accent:#d78b2d; }
.popular-panel { --panel-accent:#176aa8; }
.categories-panel { --panel-accent:#75589d; }
.quick-menu-panel { --panel-accent:#39715a; }
.obituary-search-panel { --panel-accent:#35383e; }
.inner-category-panel:has(.panel-mini-icon-advice) { --panel-accent:#39715a; }
.inner-category-panel:has(.panel-mini-icon-spark) { --panel-accent:#75589d; }
.inner-category-panel:has(.panel-mini-icon-food) { --panel-accent:#a76538; }
.inner-category-panel:has(.panel-mini-icon-history) { --panel-accent:#716052; }
.inner-category-panel:has(.panel-mini-icon-memory) { --panel-accent:#35383e; }

.archive-title-row h1 {
  display:flex;
  align-items:center;
  gap:12px;
}

.archive-title-icon {
  --panel-accent:#176aa8;
  width:38px;
  height:38px;
  border-radius:10px;
  box-shadow:0 8px 20px color-mix(in srgb, var(--panel-accent) 25%, transparent);
}

.archive-title-icon svg { width:20px; height:20px; stroke-width:1.7; }
.archive-title-icon-advice { --panel-accent:#39715a; }
.archive-title-icon-spark { --panel-accent:#75589d; }
.archive-title-icon-food { --panel-accent:#a76538; }
.archive-title-icon-history { --panel-accent:#716052; }
.archive-title-icon-memory { --panel-accent:#35383e; }
.archive-title-icon-service { --panel-accent:#c37a2a; }
.archive-title-icon-interview { --panel-accent:#4569a6; }
.archive-title-icon-games { --panel-accent:#8c4b8f; }
.archive-title-icon-page { --panel-accent:#536172; }

.category-tone-vesti { --story-accent:#176aa8; }
.category-tone-servisne-informacije { --story-accent:#c37a2a; }
.category-tone-zanimljivosti { --story-accent:#75589d; }
.category-tone-saveti { --story-accent:#39715a; }
.category-tone-intervju { --story-accent:#4569a6; }
.category-tone-suzivo-arhiva { --story-accent:#716052; }
.category-tone-suboticka-jela { --story-accent:#a76538; }
.category-tone-posmrtnice { --story-accent:#35383e; }
.category-tone-igre { --story-accent:#8c4b8f; }

.latest-editorial .package-lead {
  border:2px solid var(--story-accent, var(--brand));
}

.latest-editorial .yt-story-thumb {
  border:2px solid var(--story-accent, var(--brand));
}

.latest-editorial .story-section-label { color:var(--story-accent, var(--brand-dark)); }
.latest-editorial .thumb-category { background:color-mix(in srgb, var(--story-accent, #17243a) 88%, #0c1220); }

.side-link {
  transition:color .25s ease, background-color .25s ease, transform .34s cubic-bezier(.2,.72,.24,1), padding .34s cubic-bezier(.2,.72,.24,1);
}

.side-link:hover {
  transform:translateX(2px);
  background:rgba(255,255,255,.075);
}

.side-link:hover .side-link-icon {
  transform:translateX(1px) scale(1.07);
}

.category-lead {
  min-height:190px;
}

.category-lead-image img {
  height:190px;
  min-height:190px;
}

.category-lead-copy { padding:17px 19px; }
.category-lead-copy h3 { font-size:21px; }

.footer-logo,
.footer-logo img {
  background:transparent !important;
  box-shadow:none !important;
  border:0 !important;
  border-radius:0 !important;
}

@media (max-width:760px) {
  .archive-title-row h1 { gap:9px; }
  .archive-title-icon { width:32px; height:32px; border-radius:8px; }
  .archive-title-icon svg { width:17px; height:17px; }
  .category-lead { min-height:0; }
  .category-lead-image img { height:auto; min-height:0; }
}

/* V6 — final visual consistency across home, archives, posts and pages. */
.header-wordmark strong {
  color:#72adee !important;
  font-weight:700 !important;
}

.view-count {
  display:inline-flex !important;
  align-items:center;
  gap:4px;
  margin:0 !important;
  color:inherit;
  white-space:nowrap;
}

.view-count svg,
.article-view-icon svg {
  width:13px;
  height:13px;
  flex:0 0 auto;
  fill:none;
  stroke:currentColor;
  stroke-width:1.8;
  stroke-linecap:round;
  stroke-linejoin:round;
}

.story-stats,
.story-date {
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:5px;
}

.meta-separator { opacity:.55; }
.article-view-icon { display:flex; align-items:center; justify-content:center; }
.article-view-icon svg { width:15px; height:15px; }

/* Every right rail now follows the compact homepage system. */
.right-rail { gap:10px; }
.right-rail .panel {
  padding:12px;
  border:1px solid rgba(187,180,169,.72);
  border-radius:6px;
  box-shadow:none;
}

.right-rail .panel h2.panel-title-with-icon {
  display:flex;
  align-items:center;
  gap:8px;
  min-height:30px;
  margin:0 0 8px;
  padding:0 0 8px;
  border-left:0;
  border-bottom:2px solid color-mix(in srgb, var(--panel-accent, var(--brand)) 62%, #d9d4cc);
  color:var(--text);
  font-family:var(--sans);
  font-size:16px;
  line-height:1.05;
  font-weight:700;
  letter-spacing:-.025em;
}

.right-rail .popular-card-item {
  grid-template-columns:102px minmax(0,1fr);
  gap:9px;
  padding:7px 0;
}

.right-rail .popular-thumb {
  width:102px;
  height:58px;
  border-radius:5px;
}

.right-rail .popular-info { gap:4px; }
.right-rail .popular-info strong { font-size:10.5px; line-height:1.24; font-weight:800; }
.right-rail .popular-info span { font-size:8.5px; }
.right-rail .pills { gap:5px; }
.right-rail .pills a,
.archive-right-rail .pills a {
  padding:6px 8px;
  border-radius:4px;
  font-size:10px;
  font-weight:700;
}

.popular-panel .popular-info strong { order:1; }
.popular-panel .popular-date-inline { order:2; margin-top:1px; }
.popular-panel .popular-date-inline .view-count { color:var(--muted); }

/* Neutral news frames; only category labels carry category colour. */
.latest-editorial .package-lead {
  border:1px solid var(--line);
}

.latest-editorial .yt-story-thumb {
  border:1px solid var(--line);
}

.latest-editorial .story-section-label {
  display:inline-flex;
  width:max-content;
  padding:5px 7px 4px;
  border-radius:4px;
  color:#fff;
  background:var(--story-accent, var(--brand-dark));
  line-height:1;
}

.latest-editorial .thumb-category {
  background:var(--story-accent, #17243a);
}

.archive-news-card {
  overflow:hidden;
  border:1px solid var(--line);
  transition:border-color .32s ease, box-shadow .32s cubic-bezier(.2,.72,.24,1);
}

.archive-news-card:hover {
  border-color:color-mix(in srgb, var(--story-accent, var(--brand)) 55%, var(--line));
  box-shadow:0 12px 28px rgba(18,29,47,.07);
}

.archive-news-card .tag.blue {
  border-color:var(--story-accent, var(--brand));
  color:#fff;
  background:var(--story-accent, var(--brand));
}

/* The image always fills the complete lead-card height. */
.category-lead { min-height:190px; }
.category-lead-image {
  position:relative;
  align-self:stretch;
  height:100%;
  min-height:190px;
  background:#e5e7eb;
}
.category-lead-image img {
  position:absolute;
  inset:0;
  display:block;
  width:100%;
  height:100%;
  min-height:190px;
  object-fit:cover;
}

/* Restored sponsor colours. */
.right-rail .obituary-sponsor-panel.sponsor-funero {
  color:#fff;
  background:#111 !important;
}
.right-rail .obituary-sponsor-panel.sponsor-sarkofag {
  color:#fff;
  background:#2f2f2f !important;
}

/* Soft in/out movement for obituary cards. */
.obituary-preview-btn {
  transform:translateY(0) scale(1);
  transition:
    transform .38s cubic-bezier(.2,.72,.24,1),
    box-shadow .38s cubic-bezier(.2,.72,.24,1),
    background-color .32s ease;
  will-change:transform;
}
.obituary-preview-btn:hover,
.obituary-preview-btn:focus-visible {
  transform:translateY(-3px) scale(1.006);
  box-shadow:0 17px 36px rgba(16,24,40,.15);
}

/* Smaller, equally smooth footer-link motion. */
.footer-col a {
  transform:translateX(0);
  transition:color .30s ease, transform .36s cubic-bezier(.2,.72,.24,1);
}
.footer-col a:hover { transform:translateX(1.5px); }

/* Consistent background-colour animation for clickable controls. */
button,
.pills a,
.archive-top-pager a,
.archive-pagination a,
.obituary-search-actions a,
.footer-social-link,
.scroll-top-btn {
  transition:
    background-color .32s cubic-bezier(.2,.72,.24,1),
    color .28s ease,
    border-color .32s ease,
    box-shadow .32s ease,
    transform .36s cubic-bezier(.2,.72,.24,1);
}

@media (max-width:760px) {
  .category-lead,
  .category-lead-image { min-height:0; height:auto; }
  .category-lead-image img { position:static; height:auto; min-height:0; aspect-ratio:16/9; }
  .right-rail .popular-card-item { grid-template-columns:96px minmax(0,1fr); }
  .right-rail .popular-thumb { width:96px; height:56px; }
}

/* V7 — card surfaces, unified 6px radius and quieter motion. */
.package-lead,
.category-lead,
.yt-story-card,
.archive-news-card,
.obituary-preview-btn,
.obituary-strip-card,
.right-rail .panel {
  border-radius:6px;
}

.package-lead-image,
.category-lead-image,
.yt-story-thumb,
.archive-news-image,
.obituary-image-wrap,
.obituary-strip-thumb,
.popular-thumb,
.inner-featured-image {
  border-radius:6px;
}

/* Category archives use real cards that separate from the page background. */
.archive-news-card {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
  box-shadow:0 7px 20px rgba(18,29,47,.035);
}

.archive-news-image {
  display:block;
  overflow:hidden;
  border-radius:6px 6px 0 0;
  background:#e7e9ec;
}

.archive-news-image img {
  display:block;
  width:100%;
}

.archive-news-body {
  padding:14px 15px 16px;
}

body.dark .archive-news-card {
  background:var(--paper);
  border-color:var(--line);
  box-shadow:0 8px 22px rgba(0,0,0,.16);
}

/* Small homepage stories now share the lead-card surface. */
.package-supporting .yt-story-card,
.category-supporting .yt-story-card {
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
  box-shadow:0 6px 17px rgba(18,29,47,.03);
}

.package-supporting .yt-story-thumb,
.category-supporting .yt-story-thumb {
  border:0;
  border-radius:6px 6px 0 0;
}

.package-supporting .yt-story-info,
.category-supporting .yt-story-info {
  padding:9px 10px 10px;
}

body.dark .package-supporting .yt-story-card,
body.dark .category-supporting .yt-story-card {
  background:var(--paper);
  border-color:var(--line);
  box-shadow:0 7px 18px rgba(0,0,0,.13);
}

.latest-editorial .thumb-category {
  top:7px;
  right:7px;
  bottom:auto;
  left:auto;
  border-radius:4px;
}

/* Posmrtnica image keeps its full width; unused frame space stays white. */
.obituary-image-wrap {
  display:flex;
  align-items:center;
  justify-content:center;
  width:100%;
  aspect-ratio:4/2.75;
  overflow:hidden;
  background:#fff;
}

.obituary-image-wrap img {
  display:block;
  width:100%;
  height:100%;
  aspect-ratio:auto;
  object-fit:contain;
  background:#fff;
}

/* Card movement is applied to the wrapper so both mouse-in and mouse-out animate. */
.obituary-card {
  transform:translateY(0);
  transition:transform .40s cubic-bezier(.2,.72,.24,1);
  will-change:transform;
}

.obituary-card:hover,
.obituary-card:focus-within {
  transform:translateY(-3px);
}

.obituary-preview-btn,
.obituary-preview-btn:hover,
.obituary-preview-btn:focus-visible {
  transform:none;
  transition:box-shadow .40s cubic-bezier(.2,.72,.24,1), background-color .32s ease;
}

.obituary-card:hover .obituary-preview-btn,
.obituary-card:focus-within .obituary-preview-btn {
  box-shadow:0 17px 36px rgba(16,24,40,.15);
}

/* Image zoom is deliberately tiny and always eases back to rest. */
.package-lead-image img,
.category-lead-image img,
.yt-story-thumb img,
.archive-news-image img,
.popular-thumb img,
.obituary-strip-thumb img,
.obituary-image-wrap img {
  transform:translateZ(0) scale(1);
  transition:transform .55s cubic-bezier(.2,.72,.24,1), filter .55s cubic-bezier(.2,.72,.24,1) !important;
}

.package-lead-image:hover img,
.category-lead-image:hover img,
.yt-story-thumb:hover img,
.archive-news-image:hover img,
.popular-thumb:hover img,
.obituary-strip-thumb:hover img,
.obituary-card:hover .obituary-image-wrap img {
  transform:translateZ(0) scale(1.016) !important;
  filter:saturate(1.025) contrast(1.008);
}

/* Pills fade rather than snap. */
.pills a,
.archive-right-rail .pills a {
  transform:none;
  transition:
    background-color .38s cubic-bezier(.2,.72,.24,1),
    color .32s ease,
    border-color .38s ease,
    box-shadow .38s ease;
}

.pills a:hover,
.archive-right-rail .pills a:hover {
  transform:none;
  background:var(--brand-soft);
  border-color:color-mix(in srgb, var(--brand) 35%, var(--line));
}

/* Left sidebar movement stays discreet. */
.su-sidebar {
  transition:
    width .38s cubic-bezier(.22,1,.36,1),
    transform .38s cubic-bezier(.22,1,.36,1),
    box-shadow .42s ease;
}

.su-sidebar:hover {
  box-shadow:15px 0 48px rgba(7,14,26,.17);
}

.su-sidebar .side-link {
  transform:translateX(0);
  transition:
    background-color .34s ease,
    color .30s ease,
    transform .40s cubic-bezier(.2,.72,.24,1);
}

.su-sidebar .side-link:hover {
  transform:translateX(1px);
  background:rgba(255,255,255,.07);
}

@media (max-width:760px) {
  .package-supporting .yt-story-card,
  .category-supporting .yt-story-card {
    padding:0;
    border:1px solid var(--line);
    border-radius:6px;
  }

  .package-supporting .yt-story-thumb,
  .category-supporting .yt-story-thumb {
    height:100%;
    border-radius:6px 0 0 6px;
  }

  .package-supporting .yt-story-thumb img,
  .category-supporting .yt-story-thumb img {
    height:100%;
    aspect-ratio:auto;
    object-fit:cover;
  }

  .package-supporting .yt-story-info,
  .category-supporting .yt-story-info {
    padding:9px 10px;
  }
}

/* Keep the eye, full count and "pregleda" together on one line. */
.popular-panel .popular-date-inline {
  display:inline-flex;
  align-items:center;
  flex-wrap:nowrap;
  gap:3px;
  width:max-content;
  max-width:100%;
  white-space:nowrap;
}

.popular-panel .popular-date-inline .view-count {
  flex:0 0 auto;
}

/* Keep Google Auto Ads from widening the page by a few viewport pixels. */
html,
body {
  width:100%;
  max-width:100%;
  overflow-x:hidden;
}

@supports (overflow-x:clip) {
  html,
  body {
    overflow-x:clip;
  }
}

/* In-flow Auto Ads must respect the content column. Anchor/vignette ads stay untouched. */
.google-auto-placed,
.google-auto-placed > ins.adsbygoogle,
main ins.adsbygoogle,
.main-content ins.adsbygoogle {
  box-sizing:border-box !important;
  width:100% !important;
  max-width:100% !important;
}

.google-auto-placed {
  overflow:hidden;
}

.google-auto-placed iframe,
main ins.adsbygoogle iframe,
.main-content ins.adsbygoogle iframe {
  max-width:100% !important;
}

/* V8 — no jumping: colour and shadow transitions carry the hover state. */
.obituary-card,
.obituary-card:hover,
.obituary-card:focus-within {
  transform:none !important;
  transition:none;
}

.obituary-preview-btn,
.obituary-preview-btn:hover,
.obituary-preview-btn:focus-visible,
.obituary-card:hover .obituary-preview-btn,
.obituary-card:focus-within .obituary-preview-btn {
  transform:none !important;
  transition:box-shadow .30s ease, background-color .30s ease !important;
}

.obituary-preview-btn {
  box-shadow:0 10px 25px rgba(16,24,40,.08), inset 0 0 0 1px rgba(255,255,255,.035);
}

.obituary-card:hover .obituary-preview-btn,
.obituary-card:focus-within .obituary-preview-btn {
  box-shadow:0 15px 31px rgba(16,24,40,.14), inset 0 0 0 1px rgba(255,255,255,.11);
}

/* Personal menu and pills use the same small card language as news. */
.personal-scroll a,
.pills a,
.archive-right-rail .pills a {
  padding:7px 10px;
  border:1px solid var(--line);
  border-radius:6px;
  color:var(--text);
  background:var(--paper);
  box-shadow:0 3px 9px rgba(18,29,47,.025);
  font-family:var(--sans);
  font-size:11px;
  line-height:1.15;
  font-weight:600;
  transform:none !important;
  transition:
    background-color .30s ease,
    color .30s ease,
    border-color .30s ease,
    box-shadow .30s ease !important;
}

.personal-scroll a:hover,
.pills a:hover,
.archive-right-rail .pills a:hover {
  color:var(--text);
  background:var(--bg);
  border-color:color-mix(in srgb, var(--brand) 28%, var(--line));
  box-shadow:0 4px 11px rgba(18,29,47,.045);
}

.personal-scroll a.active {
  color:var(--brand-dark);
  background:var(--brand-soft);
  border-color:color-mix(in srgb, var(--brand) 32%, var(--line));
}

body.dark .personal-scroll a,
body.dark .pills a,
body.dark .archive-right-rail .pills a {
  color:var(--text);
  background:var(--paper);
  border-color:var(--line);
}

body.dark .personal-scroll a:hover,
body.dark .pills a:hover,
body.dark .archive-right-rail .pills a:hover {
  color:var(--text);
  background:var(--bg);
}

body.dark .personal-scroll a.active {
  color:#8cc7f3;
  background:var(--brand-soft);
}

/* Popular sidebar rows stay transparent in dark mode on hover. */
body.dark .popular-card-item:hover {
  transform:none !important;
  background:transparent !important;
  box-shadow:none !important;
}

/* Left-menu hover has no positional shift. */
.su-sidebar .side-link,
.su-sidebar .side-link:hover {
  transform:none !important;
  transition:background-color .30s ease, color .30s ease !important;
}

.su-sidebar .side-link:hover .side-link-icon {
  transform:scale(1.025) !important;
  transition:transform .30s ease, color .30s ease !important;
}

/* Header actions move only two pixels and ease back at the same speed. */
.action-btn {
  transform:translateY(0);
  transition:
    transform .30s cubic-bezier(.2,.72,.24,1),
    background-color .30s ease,
    border-color .30s ease,
    box-shadow .30s ease !important;
}

.action-btn:hover,
.action-btn:focus-visible {
  transform:translateY(-2px) !important;
}

.package-lead-image {border-radius:3px 3px 0 0 !important;}
.category-lead-image {border-radius:0px !important;}

/* Master menu fix — reliable open/close state and true hamburger-to-X motion. */
.side-menu-head .side-hamb-mark i,
.mobile-menu-btn .side-hamb-mark i {
  width:22px;
  opacity:1;
  transform:none;
  transition:top .30s ease, transform .30s ease, opacity .22s ease, width .30s ease !important;
}

.side-menu-head .side-hamb-mark i:nth-child(1),
.mobile-menu-btn .side-hamb-mark i:nth-child(1) { top:13px; }
.side-menu-head .side-hamb-mark i:nth-child(2),
.mobile-menu-btn .side-hamb-mark i:nth-child(2) { top:20px; }
.side-menu-head .side-hamb-mark i:nth-child(3),
.mobile-menu-btn .side-hamb-mark i:nth-child(3) { top:27px; }

body.sidebar-open .side-menu-head .side-hamb-mark i:nth-child(1),
body.mobile-sidebar-open .mobile-menu-btn .side-hamb-mark i:nth-child(1) {
  top:20px;
  width:22px;
  transform:rotate(45deg);
}

body.sidebar-open .side-menu-head .side-hamb-mark i:nth-child(2),
body.mobile-sidebar-open .mobile-menu-btn .side-hamb-mark i:nth-child(2) {
  opacity:0;
}

body.sidebar-open .side-menu-head .side-hamb-mark i:nth-child(3),
body.mobile-sidebar-open .mobile-menu-btn .side-hamb-mark i:nth-child(3) {
  top:20px;
  width:22px;
  transform:rotate(-45deg);
}

.side-logo-sub,
.header-wordmark strong {
  color:#72adee !important;
}

/* Mobile spacing for compact supporting stories. */
@media (max-width:760px) {
  .category-supporting {
    gap:9px;
  }

  .category-supporting .yt-story-card.compact {
    padding:7px;
    gap:10px;
    border:1px solid var(--line);
    border-radius:6px;
    background:var(--paper);
  }

  .category-supporting .yt-story-card.compact .yt-story-thumb {
    border-radius:5px;
  }

  .category-supporting .yt-story-card.compact .yt-story-info {
    padding:4px 5px 4px 0;
  }
}

/* Mobile article: compact spacing and a single-line information bar. */
@media (max-width:760px) {
  .inner-post-header {
    padding:18px 13px 14px;
  }

  .article-data-bar {
    flex-wrap:nowrap;
    gap:0;
    padding-top:12px;
  }

  .article-data-bar > span,
  .article-data-bar > span:first-child {
    flex:0 1 auto;
    min-width:0;
    padding:0 9px;
    border-bottom:0;
  }

  .article-data-bar > span:first-child {
    flex:1 1 auto;
    padding-left:0;
  }

  .article-data-bar time,
  .article-data-bar strong {
    white-space:nowrap;
  }

  .inner-post-content {
    padding:20px 14px 30px;
    line-height:1.62;
  }

  .inner-post-content > p:first-child {
    line-height:1.58;
  }
}

/* Homepage supporting-story category sits below the image, before the title. */
.latest-editorial .yt-story-info > .thumb-category {
  position:static;
  display:inline-flex;
  width:max-content;
  max-width:100%;
  margin:0 0 6px;
      padding: 4px 6px 2px 6px;
  color:#fff;
  background:var(--story-accent, #17243a);
  white-space:nowrap;
}

@media (max-width:760px) {
  .editorial-home .editorial-heading { margin-top:6px; }
  


  /* Preserve the category lead card surface on mobile. */
  .editorial-home .category-package-grid .category-lead {
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:6px;
    background:var(--paper);
    margin-bottom:4px;
  }

  .editorial-home .category-package-grid .category-lead-image {
    border-radius:5px 5px 0 0;
  }

  .editorial-home .category-package-grid .category-lead-copy {
    padding:12px 13px 14px;
  }

  .latest-editorial .yt-story-info > .thumb-category {
    display:inline-flex;
    margin-bottom:5px;
  }

  /* Category archive keeps its own clean one-column mobile layout. */
  .archive-stream,
  .archive-stream .archive-news-grid,
  .archive-stream .archive-news-card {
    width:100%;
    min-width:0;
    max-width:100%;
  }

  .archive-stream .archive-news-grid {
    grid-template-columns:minmax(0, 1fr);
    gap:12px;
  }

  .archive-stream .archive-news-card {
    display:block;
    overflow:hidden;
    border:1px solid var(--line);
    border-radius:6px;
    background:var(--paper);
  }

  .archive-stream .archive-news-image,
  .archive-stream .archive-news-image img {
    display:block;
    width:100%;
    min-width:0;
  }

  .archive-stream .archive-news-image img {
    height:auto;
    aspect-ratio:16/9;
    object-fit:cover;
  }

  .archive-stream .archive-news-body {
    padding:12px 13px 14px;
  }
}

/* Mobile category header: flexible title column and fixed pager column. */
@media (max-width:760px) {
  .archive-title-row {
    display:grid;
    grid-template-columns:minmax(0, 1fr) auto;
    align-items:center;
    gap:10px;
    width:100%;
    min-width:0;
  }

  .archive-title-row h1 {
    display:grid;
    grid-template-columns:32px minmax(0, 1fr);
    align-items:center;
    gap:9px;
    min-width:0;
    margin:0;
    font-size:clamp(21px, 6.5vw, 28px);
    line-height:1.04;
    letter-spacing:-.045em;
    white-space:normal;
  }

  .archive-title-row h1 > span:last-child {
    display:block;
    min-width:0;
    overflow-wrap:break-word;
  }

  .archive-title-row .archive-title-icon {
    width:32px;
    height:32px;
  }

  .archive-title-row .page-indicator {
    display:block;
    margin-top:4px;
    font-size:11px;
    line-height:1.1;
    letter-spacing:0;
    white-space:nowrap;
  }

  .archive-title-row .archive-top-pager {
    display:grid;
    grid-template-columns:repeat(2, 34px);
    gap:5px;
    flex:0 0 auto;
    justify-content:end;
    white-space:nowrap;
  }

  .archive-title-row .archive-top-pager a,
  .archive-title-row .archive-top-pager span.is-disabled {
    width:34px;
    min-width:34px;
    height:34px;
    min-height:34px;
    padding:0;
  }
}


  .latest-editorial .editorial-heading {display:none;}

/* Final authority: header dropdown and archive title alignment. */
.header-quick-menu { position:relative; display:flex; }
.personal-menu-toggle .mi {
  fill:var(--brand);
  transition:transform .32s cubic-bezier(.2,.72,.24,1);
}
.personal-menu-toggle[aria-expanded="true"] {
  border-color:color-mix(in srgb, var(--brand) 52%, var(--line));
  background:var(--brand-soft);
}
.personal-menu-toggle[aria-expanded="true"] .mi { transform:rotate(18deg) scale(.94); }

.header-personal-menu {
  position:absolute;
  top:calc(100% + 10px);
  right:0;
  z-index:180;
  width:280px;
  padding:9px;
  border:1px solid var(--line);
  border-radius:10px;
  background:var(--paper);
  box-shadow:0 18px 46px rgba(16,24,40,.16);
  opacity:0;
  visibility:hidden;
  pointer-events:none;
  transform:translateY(-7px) scale(.985);
  transform-origin:top right;
  transition:opacity .24s ease, visibility .24s ease, transform .3s cubic-bezier(.2,.72,.24,1);
}
.header-personal-menu.is-open {
  opacity:1;
  visibility:visible;
  pointer-events:auto;
  transform:translateY(0) scale(1);
}
.header-personal-menu .personal-scroll {
  width:100%;
  min-height:0;
  margin:0;
  display:grid;
  gap:4px;
  overflow:visible;
}
.header-personal-menu .personal-menu-heading {
  display:block;
  padding:5px 8px 7px;
  color:var(--muted);
  font-size:10px;
  font-weight:850;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.header-personal-menu .personal-scroll a {
  width:100%;
  min-width:0;
  padding:9px 10px;
  border:1px solid transparent;
  border-radius:6px;
  background:transparent;
  color:var(--text);
  font-size:13px;
  font-weight:750;
  line-height:1.2;
  white-space:normal;
  transition:background-color .28s ease, color .28s ease, transform .3s cubic-bezier(.2,.72,.24,1);
}
.header-personal-menu .personal-scroll a:hover {
  color:var(--brand-dark);
  background:var(--brand-soft);
  transform:translateX(2px);
}
.header-personal-menu .personal-menu-settings {
  margin-top:4px;
  border-color:var(--line) !important;
  color:var(--brand-dark) !important;
}
body.dark .header-personal-menu {
  background:#111b2b;
  border-color:rgba(255,255,255,.12);
  box-shadow:0 20px 48px rgba(0,0,0,.34);
}
body.dark .header-personal-menu .personal-scroll a { color:var(--text); background:transparent; }
body.dark .header-personal-menu .personal-scroll a:hover { color:#dcecff; background:rgba(114,173,238,.13); }

.archive-title-row h1,
.archive-title-row h1 > span:last-child { white-space:nowrap; }
.archive-title-row .page-indicator {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-width:22px;
  height:22px;
  margin:0 0 0 4px;
  padding:0 6px;
  border:1px solid var(--line);
  border-radius:6px;
  background:var(--paper);
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  line-height:1;
  vertical-align:middle;
}
.popular-title-row {
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
}
.archive-title-actions {
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:9px;
  flex:0 0 auto;
}
.my-menu-title-row { display:block; }
.my-menu-title-row h1 {
  display:flex;
  align-items:baseline;
  gap:9px;
  white-space:nowrap;
}
.archive-title-note {
  color:var(--muted);
  font-family:var(--sans);
  font-size:12px;
  font-weight:700;
  letter-spacing:0;
}

@media (max-width:760px) {
  .header-personal-menu {
    position:fixed;
    top:74px;
    right:12px;
    width:min(292px, calc(100vw - 24px));
    max-height:calc(100vh - 88px);
    overflow-y:auto;
  }
  .archive-title-row h1 {
    display:flex;
    align-items:center;
    min-width:0;
    font-size:clamp(22px, 7vw, 29px);
    line-height:1;
    white-space:nowrap;
  }
  .archive-title-row h1.archive-title-with-icon {
    display:grid;
    grid-template-columns:32px minmax(0,1fr);
    gap:8px;
    font-size:clamp(18px, 5.5vw, 25px);
  }
  .archive-title-row h1.archive-title-with-icon > span:last-child {
    display:inline-flex;
    align-items:center;
    min-width:0;
    gap:2px;
    white-space:nowrap;
  }
  .archive-title-row .page-indicator {
    display:inline-flex;
    flex:0 0 auto;
    height:20px;
    min-width:20px;
    margin:0 0 0 3px;
    padding:0 5px;
    font-size:10px;
  }
  .popular-title-row {
    display:grid;
    grid-template-columns:1fr;
    gap:10px;
  }
  .archive-title-actions { width:100%; justify-content:space-between; }
  .popular-period-form select { width:auto; min-width:150px; max-width:none; }
  .my-menu-title-row h1 { font-size:clamp(24px, 8vw, 31px); }
  .archive-title-note { font-size:11px; }
}

/* Category archive titles match their homepage section typography. */
.archive-title-row h1.archive-title-with-icon {
  font-family:var(--sans);
  font-size:27px;
  line-height:1.08;
  font-weight:800;
  letter-spacing:-.045em;
}

.archive-title-with-icon > .archive-title-icon-news + span { color:#176aa8; }
.archive-title-with-icon > .archive-title-icon-service + span { color:#c37a2a; }
.archive-title-with-icon > .archive-title-icon-spark + span { color:#75589d; }
.archive-title-with-icon > .archive-title-icon-advice + span { color:#39715a; }
.archive-title-with-icon > .archive-title-icon-food + span { color:#a76538; }
.archive-title-with-icon > .archive-title-icon-history + span { color:#716052; }
.archive-title-with-icon > .archive-title-icon-memory + span { color:#5f6570; }
.archive-title-with-icon > .archive-title-icon-interview + span { color:#4569a6; }
.archive-title-with-icon > .archive-title-icon-games + span { color:#8c4b8f; }
.archive-title-with-icon > .archive-title-icon-page + span { color:#536172; }

@media (max-width:760px) {
  .archive-title-row h1.archive-title-with-icon {
    font-size:clamp(21px, 6vw, 23px);
  }
}

.archive-title-icon-popular { --panel-accent:#176aa8; }
.archive-title-icon-quick { --panel-accent:#39715a; }
.archive-title-with-icon > .archive-title-icon-popular + span { color:#176aa8; }
.archive-title-with-icon > .archive-title-icon-quick + span { color:#39715a; }
