/* FricNews — International standard news layout
   Version: 2026-01-31 (v008)
*/
:root{
  --bg: #0b1220;
  --bg2:#0f1a33;
  --card:#0f1930;
  --text:#eaf0ff;
  --muted:#a9b7d6;
  --line: rgba(255,255,255,.10);
  --accent:#ff2a2a;          /* Fric red */
  --accent2:#3bd6ff;         /* cool cyan highlight */
  --paper:#0c1529;
  --shadow: 0 14px 40px rgba(0,0,0,.35);
  --radius: 18px;
  --radius2: 26px;
  --wrap: 1180px;
  --font: Inter, system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  --gothic: "UnifrakturMaguntia", serif;
}

[data-theme="light"]{
  --bg:#f6f8ff;
  --bg2:#eef2ff;
  --paper:#ffffff;
  --card:#ffffff;
  --text:#0c1325;
  --muted:#506082;
  --line: rgba(12,19,37,.12);
  --shadow: 0 14px 40px rgba(12,19,37,.12);
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family:var(--font);
  background: radial-gradient(1200px 800px at 20% -10%, rgba(59,214,255,.14), transparent 60%),
              radial-gradient(1100px 700px at 80% 0%, rgba(255,42,42,.10), transparent 55%),
              linear-gradient(180deg, var(--bg), var(--bg2));
  color:var(--text);
  line-height:1.55;
}

a{color:inherit; text-decoration:none}
a:hover{opacity:.95}
.wrap{max-width:var(--wrap); margin:0 auto; padding:0 16px}

.sr-only{
  position:absolute; width:1px; height:1px; padding:0; margin:-1px;
  overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0;
}

.skip-link{
  position:absolute; left:-999px; top:8px;
  background:var(--accent); color:#fff; padding:10px 12px;
  border-radius:10px; z-index:1000;
}
.skip-link:focus{left:12px}

.topbar{
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.20);
  backdrop-filter: blur(10px);
}
.topbar__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:10px 0;
  gap:14px;
}
.topbar__left{display:flex; align-items:center; gap:10px; flex-wrap:wrap}
.topbar__right{display:flex; gap:12px; flex-wrap:wrap}
.topbar__link{color:var(--muted); font-weight:600}
.topbar__link:hover{color:var(--text)}
.topbar__label{font-weight:800; letter-spacing:.03em}
.topbar__muted{color:var(--muted)}
.dot-live{
  width:10px; height:10px; border-radius:999px;
  background: var(--accent);
  box-shadow: 0 0 0 5px rgba(255,42,42,.18);
}

.masthead{
  position:sticky; top:0; z-index:50;
  background: rgba(11,18,32,.65);
  backdrop-filter: blur(12px);
  border-bottom:1px solid var(--line);
}
[data-theme="light"] .masthead{background: rgba(246,248,255,.75)}
.masthead__inner{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 0;
  gap:16px;
}

.brand{text-align:center; flex:1}
.brand__logo{display:inline-flex; flex-direction:column; gap:2px; align-items:center}
.brand__name{
  font-family:var(--gothic);
  font-size:44px;
  line-height:1;
  letter-spacing:.02em;
  text-shadow: 0 10px 30px rgba(0,0,0,.35);
}
.brand__tagline{
  font-size:13px; color:var(--muted); font-weight:700; letter-spacing:.08em;
  text-transform:uppercase;
}

.masthead__controls{display:flex; gap:10px}
.icon-btn{
  appearance:none; border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  color:var(--text);
  border-radius:12px;
  padding:10px 12px;
  cursor:pointer;
}
.icon-btn:hover{transform: translateY(-1px)}
.icon-btn:active{transform: translateY(0px)}

.navwrap{border-top:1px solid var(--line)}
.navwrap__inner{
  display:flex; align-items:center; justify-content:space-between;
  gap:14px;
  padding:10px 0;
}
.nav{
  display:flex; flex-wrap:wrap; gap:10px 14px;
  justify-content:center;
  flex:1;
}
.nav__link{
  color:var(--muted);
  font-weight:800;
  letter-spacing:.02em;
  padding:10px 10px;
  border-radius:12px;
}
.nav__link:hover{color:var(--text); background: rgba(255,255,255,.06)}
.nav__link.is-active{
  color:var(--text);
  background: linear-gradient(180deg, rgba(255,42,42,.18), rgba(255,42,42,.06));
  border:1px solid rgba(255,42,42,.22);
}

.search{
  display:flex; align-items:center; gap:10px;
  min-width: 320px;
}
.search__input{
  width:100%;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  border-radius:14px;
  padding:11px 12px;
  color:var(--text);
  outline:none;
}
.search__input:focus{border-color: rgba(59,214,255,.55); box-shadow: 0 0 0 4px rgba(59,214,255,.12)}
.search__btn{
  border:none;
  background: linear-gradient(90deg, var(--accent), #ff5a1f);
  color:#fff;
  font-weight:900;
  border-radius:14px;
  padding:11px 14px;
  cursor:pointer;
}

.breaking{
  border-bottom:1px solid var(--line);
  background: rgba(0,0,0,.18);
}
.breaking__inner{
  display:flex; align-items:center; gap:12px;
  padding:10px 0;
}
.breaking__badge{
  font-weight:1000;
  letter-spacing:.10em;
  text-transform:uppercase;
  padding:8px 10px;
  border-radius:999px;
  background: rgba(255,42,42,.18);
  border:1px solid rgba(255,42,42,.22);
}
.breaking__more{margin-left:auto; color:var(--muted); font-weight:800}
.breaking__more:hover{color:var(--text)}

.ticker{overflow:hidden; flex:1}
.ticker__track{
  display:inline-flex; align-items:center; gap:14px;
  white-space:nowrap;
  animation: ticker 26s linear infinite;
}
.ticker__item{color:var(--text); font-weight:650}
.ticker__sep{color:var(--muted)}
@keyframes ticker{
  0%{transform:translateX(0)}
  100%{transform:translateX(-35%)}
}

.main{padding:22px 0 50px}

/* Page shell */
.pagehead{
  margin-top:14px;
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  padding:18px;
}
.pagehead__kicker{color:var(--accent2); font-weight:950; letter-spacing:.10em; text-transform:uppercase; font-size:12px}
.pagehead__title{margin:8px 0 6px; font-size:30px; line-height:1.15; font-weight:1000}
.pagehead__desc{margin:0; color:var(--muted); max-width:70ch}

.pagegrid{
  display:grid;
  grid-template-columns: 1.7fr .9fr;
  gap:16px;
  margin-top:16px;
}

.paper{
  border:1px solid var(--line);
  border-radius: var(--radius2);
  background: rgba(255,255,255,.04);
  box-shadow: var(--shadow);
  padding:18px;
}

.prose p{margin:0 0 12px; color:var(--text)}
.prose h2{margin:18px 0 10px; font-size:18px; font-weight:1000}
.prose ul{margin:0 0 12px 18px; color:var(--muted)}
.prose li{margin:6px 0}

.form{display:grid; gap:10px}
.field label{display:block; font-weight:900; margin-bottom:6px}
.field input, .field textarea, .field select{
  width:100%;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  border-radius:14px;
  padding:11px 12px;
  color:var(--text);
  outline:none;
}
.field textarea{min-height:130px; resize:vertical}
.field input:focus, .field textarea:focus, .field select:focus{
  border-color: rgba(59,214,255,.55);
  box-shadow: 0 0 0 4px rgba(59,214,255,.12)
}

.badge{
  display:inline-flex; align-items:center; gap:8px;
  padding:8px 10px;
  border-radius:999px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.06);
  font-weight:900;
  color:var(--muted);
}

.table{
  width:100%;
  border-collapse: collapse;
  overflow:hidden;
  border-radius: 16px;
  border:1px solid var(--line);
}
.table th, .table td{
  padding:12px 10px;
  border-bottom:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}
.table th{font-weight:1000}
.table td{color:var(--muted); font-weight:650}
.table tr:last-child td{border-bottom:none}

.article__title{margin:8px 0 8px; font-size:36px; line-height:1.1; font-weight:1100}
.article__dek{margin:0 0 12px; color:var(--muted); font-size:16px}
.article__byline{display:flex; gap:10px; flex-wrap:wrap; align-items:center; color:var(--muted); font-weight:700}
.article__byline a{color:var(--text); font-weight:900}
.article__hero{
  margin:14px 0 14px;
  height: 360px;
  border-radius: var(--radius2);
  border:1px solid var(--line);
  background: linear-gradient(135deg, rgba(59,214,255,.26), rgba(255,42,42,.16)),
              linear-gradient(180deg, rgba(0,0,0,.10), rgba(0,0,0,.45));
  position:relative;
  overflow:hidden;
}
.article__hero .media__credit{position:absolute}

.share{display:flex; gap:10px; flex-wrap:wrap; margin-top:12px}
.pill{
  border:1px solid var(--line);
  background: rgba(255,255,255,.05);
  color:var(--text);
  font-weight:900;
  border-radius:999px;
  padding:10px 12px;
}

hr.sep{border:0; border-top:1px solid var(--line); margin:16px 0}

.footer{
  margin-top:26px;
  border-top:1px solid var(--line);
  background: rgba(0,0,0,.16);
}
.footer__inner{
  padding:22px 0;
  display:grid;
  grid-template-columns: 1.2fr 1.8fr;
  gap:18px;
}
.footer__name{font-family:var(--gothic); font-size:30px; line-height:1}
.footer__tag{color:var(--muted); font-weight:800; letter-spacing:.06em; text-transform:uppercase; font-size:12px; margin-top:4px}
.footer__small{color:var(--muted); margin:10px 0 0}
.footer__cols{
  display:grid;
  grid-template-columns: repeat(3, 1fr);
  gap:14px;
}
.footer__title{margin:0 0 10px; font-weight:1000}
.footer__col a{display:block; color:var(--muted); font-weight:700; padding:6px 0}
.footer__col a:hover{color:var(--text)}

.footer__bottom{
  padding:14px 0 20px;
  color:var(--muted);
  font-weight:700;
  display:flex; justify-content:space-between; flex-wrap:wrap; gap:10px;
}

@media (max-width: 980px){
  .pagegrid{grid-template-columns: 1fr}
  .brand__name{font-size:40px}
  .search{min-width: 100%}
  .navwrap__inner{flex-direction:column; align-items:stretch}
  .nav{justify-content:flex-start}
  .footer__inner{grid-template-columns: 1fr}
}
@media (max-width: 560px){
  .brand__name{font-size:36px}
  .brand__tagline{font-size:12px}
  .article__hero{height:280px}
  .article__title{font-size:30px}
}

/* Mobile menu */
.nav.is-collapsed{display:none}
.nav.is-open{
  display:flex;
  flex-direction:column;
  padding:10px;
  border:1px solid var(--line);
  border-radius:16px;
  background: rgba(0,0,0,.18);
}
[data-theme="light"] .nav.is-open{background: rgba(255,255,255,.72)}

/* Brand casing lock */
.brand{ text-transform:none; font-variant:normal; }

/* LIGHT MODE FIX */
body.light-mode {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.light-mode p,
body.light-mode span,
body.light-mode li,
body.light-mode a {
    color: #000000 !important;
}

body.light-mode header,
body.light-mode nav,
body.light-mode footer,
body.light-mode .card,
body.light-mode .section,
body.light-mode .content-box {
    background-color: #ffffff !important;
    color: #000000 !important;
}

body.light-mode a:hover {
    color: #333333 !important;
}



/* =========================================================
   GUARDIAN-LEVEL LIGHT MODE UPGRADE
   Inspired by the layered, calmer light treatment of
   the Guardian homepage: soft paper background, flatter
   cards, quieter borders, stronger hierarchy.
   ========================================================= */

:root{
  --serif-head: Georgia, "Times New Roman", Times, serif;
}

[data-theme="light"]{
  --bg: #f3efe6;
  --bg2:#f3efe6;
  --paper:#ffffff;
  --card:#ffffff;
  --text:#121212;
  --muted:#5c5c5c;
  --line: rgba(18,18,18,.14);
  --shadow: 0 2px 10px rgba(18,18,18,.04);
  --accent:#c70000;
  --accent2:#506991;
  --radius: 10px;
  --radius2: 12px;
}

/* Remove the glowing dark-theme gradient in light mode */
html[data-theme="light"] body{
  background: #f3efe6 !important;
  color: var(--text);
}

/* Top chrome */
html[data-theme="light"] .topbar{
  background: #efe9dd;
  border-bottom: 1px solid rgba(18,18,18,.10);
}

html[data-theme="light"] .masthead{
  background: rgba(255,255,255,.94);
  border-bottom: 1px solid rgba(18,18,18,.12);
  backdrop-filter: blur(10px);
}

html[data-theme="light"] .navwrap{
  background: #ffffff;
  border-top: 1px solid rgba(18,18,18,.08);
}

html[data-theme="light"] .brand__name{
  color:#121212;
  text-shadow:none;
}

html[data-theme="light"] .brand__tagline,
html[data-theme="light"] .topbar__muted,
html[data-theme="light"] .topbar__link,
html[data-theme="light"] .breaking__more,
html[data-theme="light"] .footer__tag,
html[data-theme="light"] .footer__small,
html[data-theme="light"] .footer__bottom{
  color:#5c5c5c;
}

html[data-theme="light"] .topbar__link:hover,
html[data-theme="light"] .breaking__more:hover,
html[data-theme="light"] .footer__col a:hover{
  color:#121212;
}

/* Buttons and controls */
html[data-theme="light"] .icon-btn,
html[data-theme="light"] .pill,
html[data-theme="light"] .badge{
  background:#ffffff;
  color:#121212;
  border-color: rgba(18,18,18,.14);
  box-shadow:none;
}

html[data-theme="light"] .search__input,
html[data-theme="light"] .field input,
html[data-theme="light"] .field textarea,
html[data-theme="light"] .field select{
  background:#ffffff;
  color:#121212;
  border-color: rgba(18,18,18,.16);
}

html[data-theme="light"] .search__input::placeholder,
html[data-theme="light"] .field input::placeholder,
html[data-theme="light"] .field textarea::placeholder{
  color:#7b7b7b;
}

/* Navigation */
html[data-theme="light"] .nav__link{
  color:#222222;
  border-radius: 6px;
}

html[data-theme="light"] .nav__link:hover{
  color:#121212;
  background:#ece7dc;
}

html[data-theme="light"] .nav__link.is-active{
  color:#121212;
  background:#ece7dc;
  border:1px solid rgba(18,18,18,.10);
}

/* Breaking strip */
html[data-theme="light"] .breaking{
  background:#f6f1e7;
  border-bottom:1px solid rgba(18,18,18,.10);
}

html[data-theme="light"] .breaking__badge{
  background:#fff1f1;
  border-color: rgba(199,0,0,.18);
  color:#9b0000;
}

html[data-theme="light"] .ticker__item{
  color:#121212;
}

html[data-theme="light"] .ticker__sep{
  color:#8a8a8a;
}

/* Main content surfaces */
html[data-theme="light"] .pagehead,
html[data-theme="light"] .paper{
  background:#ffffff;
  border:1px solid rgba(18,18,18,.12);
  box-shadow:none;
}

html[data-theme="light"] .pagehead{
  padding:20px;
}

html[data-theme="light"] .pagehead__kicker,
html[data-theme="light"] .kicker{
  color:#b30000;
  letter-spacing:.08em;
}

html[data-theme="light"] .pagehead__desc,
html[data-theme="light"] .article__dek,
html[data-theme="light"] .meta,
html[data-theme="light"] .table td,
html[data-theme="light"] .prose ul{
  color:#5c5c5c;
}

/* Guardian-style hierarchy: stronger serif headlines */
html[data-theme="light"] .headline,
html[data-theme="light"] .hero__title,
html[data-theme="light"] .feature__title,
html[data-theme="light"] .pagehead__title,
html[data-theme="light"] .article__title,
html[data-theme="light"] h1,
html[data-theme="light"] h2,
html[data-theme="light"] h3{
  font-family: var(--serif-head);
  color:#121212;
  letter-spacing:-0.01em;
  line-height:1.06;
}

html[data-theme="light"] .article__title{
  font-size:42px;
  font-weight:700;
}

html[data-theme="light"] .pagehead__title{
  font-size:34px;
  font-weight:700;
}

html[data-theme="light"] .prose p{
  color:#222222;
}

/* Hero image area should feel less glossy */
html[data-theme="light"] .article__hero{
  border:1px solid rgba(18,18,18,.12);
  background:
      linear-gradient(180deg, rgba(255,255,255,.08), rgba(18,18,18,.08)),
      linear-gradient(135deg, rgba(80,105,145,.15), rgba(199,0,0,.08));
}

/* Tables */
html[data-theme="light"] .table{
  border-color: rgba(18,18,18,.14);
}
html[data-theme="light"] .table th,
html[data-theme="light"] .table td{
  border-bottom-color: rgba(18,18,18,.10);
}
html[data-theme="light"] .table th{
  color:#121212;
}

/* Footer */
html[data-theme="light"] .footer{
  background:#eee7da;
  border-top:1px solid rgba(18,18,18,.12);
}

html[data-theme="light"] .footer__name{
  color:#121212;
}

/* Mobile nav panel */
html[data-theme="light"] .nav.is-open{
  background:#ffffff;
  border-color: rgba(18,18,18,.14);
  box-shadow: 0 8px 24px rgba(18,18,18,.06);
}

/* Small screens */
@media (max-width: 560px){
  html[data-theme="light"] .article__title{font-size:34px}
  html[data-theme="light"] .pagehead__title{font-size:30px}
}

/* WordPress live post support */
.article__hero--image{height:auto; min-height:0; overflow:hidden; background:transparent; border:0; padding:0}
.article__hero--image img{display:block; width:100%; height:auto; border-radius:18px}
.prose img{max-width:100%; height:auto}
.prose .wp-caption{max-width:100%}
.prose blockquote{border-left:4px solid currentColor; padding-left:18px; margin-left:0; color:var(--muted)}
.prose table{width:100%; border-collapse:collapse; margin:18px 0}
.prose th,.prose td{border:1px solid rgba(128,128,128,.35); padding:10px; text-align:left}


.article-source{
  margin-top:24px;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:14px;
  background:rgba(255,255,255,.04);
  font-size:.95rem;
}
.article-source a{
  font-weight:800;
  text-decoration:underline;
  text-underline-offset:3px;
}
html[data-theme="light"] .article-source{
  background:#f8fafc;
}
.ticker__item{
  white-space:nowrap;
}
a.ticker__item:hover{
  text-decoration:underline;
  text-underline-offset:3px;
}

/* FricNews mobile stability and image loading refinements */
img{max-width:100%;height:auto;vertical-align:middle}
.article__hero--image{aspect-ratio:16/9;display:block;background:rgba(255,255,255,.035)}
.article__hero--image img{width:100%;height:100%;object-fit:cover;display:block}
.prose img{display:block;margin:14px auto;max-width:100%;height:auto}
.archive-list .article-card{content-visibility:auto;contain-intrinsic-size:520px}

@media (max-width:980px){
  #primaryNav{display:none}
  #primaryNav.is-open{display:flex;flex-direction:column}
  .navwrap__inner{display:block}
  .search{width:100%;min-width:0;margin-top:10px}
}

@media (max-width:560px){
  .wrap{padding-left:12px;padding-right:12px}
  .masthead__inner{min-height:72px}
  .pagegrid{display:block}
  .paper{padding:14px;border-radius:18px}
  .article__hero--image{aspect-ratio:16/9}
  .article__title{font-size:clamp(1.55rem,7vw,2.05rem)}
  .brand__name{font-size:34px;line-height:1.05}
}


/* FricNews stronger mobile anti-layout-shift refinements */
html{overflow-x:hidden}
body{overflow-x:hidden}
.paper,.article-card{min-width:0}
.article-card .article__hero--image{aspect-ratio:16/9}
.article-card .article__dek{overflow-wrap:anywhere}
.nav.is-collapsed{display:none}
@media (max-width:980px){
  .pagegrid{display:block!important}
  .grid__right{margin-top:16px}
  .navwrap__inner{display:block!important}
  #primaryNav:not(.is-open){display:none!important}
  .breaking__inner{display:grid;grid-template-columns:auto minmax(0,1fr) auto;gap:8px}
  .ticker{min-width:0;overflow:hidden}
}
@media (max-width:560px){
  .topbar__inner{display:block}
  .topbar__right{margin-top:6px}
  .article-card{contain:layout paint;content-visibility:auto;contain-intrinsic-size:520px}
}


/* FricNews fix: prevent duplicate desktop pagination / scroll controls */
.pagination + .pagination,
nav.pagination + .pagination,
.pagination ~ .pagination {
  display: none !important;
}

.pagination {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  justify-content: center;
  margin-top: 24px;
}

.pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  min-height: 38px;
}

/* FricNews fix: remove duplicate outer desktop scrollbar.
   Keep one real scrolling area only. */
html{
  height:100% !important;
  overflow-y:hidden !important;
  overflow-x:hidden !important;
}
body{
  min-height:100% !important;
  height:100% !important;
  overflow-y:auto !important;
  overflow-x:hidden !important;
}
@media (max-width:980px){
  html{overflow-y:hidden !important;}
  body{overflow-y:auto !important;}
}


/* FricNews v011: listing cards side-by-side on desktop/tablet.
   Image sits beside the intro text, while mobile stays stacked. */
.archive-list .article-card--side{
  display:grid;
  grid-template-columns:minmax(300px, 380px) minmax(0, 1fr);
  gap:22px;
  align-items:start;
  padding:0 0 22px;
  margin:0 0 22px;
  border-bottom:1px solid var(--line);
}
.archive-list .article-card--side .article-card__media{
  width:100%;
  aspect-ratio:16/10;
  margin:0;
  border-radius:16px;
  overflow:hidden;
}
.archive-list .article-card--side .article-card__media img{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.archive-list .article-card--side .article__title{
  font-size:clamp(1.25rem,1.7vw,1.85rem);
  margin-top:4px;
}
.archive-list .article-card--side .article__dek{
  margin-top:10px;
}
.archive-list .article-card--side .article-card__action{
  margin-bottom:0;
}
@media (max-width:760px){
  .archive-list .article-card--side{
    display:block;
  }
  .archive-list .article-card--side .article-card__media{
    margin:0 0 14px;
    aspect-ratio:16/9;
  }
}
