/* BOPELNEWS CMS 1.3.4 — one editable palette shared by frontend, admin and login. */
:root{--brand:#0f766e;--primary:#0f766e;--primary2:#0b564f;--brand-on-primary:#fff;--brand-text:#0e5d5a;--accent:#53a59e;--ink:#18282a;--paper:#f5f8f7;--page:var(--paper);--surface:#fff;--line:#dee8e4;--muted:#758080;--radius:14px}
.cms-themed{color:var(--ink);background-color:var(--paper);font-family:var(--body-font,Inter,Arial,sans-serif)}
.cms-themed a:focus-visible,.cms-themed button:focus-visible,.cms-themed :is(input,select,textarea):focus-visible{outline:3px solid var(--accent);outline-offset:2px}
.cms-themed :is(input,select,textarea):focus{border-color:var(--brand);box-shadow:0 0 0 3px color-mix(in srgb,var(--brand) 14%,transparent)}
/* Admin global */
.cms-themed .sidebar,.cms-themed .side-bottom,.cms-themed .topbar,.cms-themed .settings-tabs{background:var(--surface);border-color:var(--line)}
.cms-themed .content{color:var(--ink)}
.cms-themed :is(.panel,.stat:not(.primary),.builder-card,.media-card,.auth-card){background:var(--surface);border-color:var(--line);border-radius:var(--radius);color:var(--ink)}
.cms-themed .stat.primary{background:linear-gradient(130deg,var(--primary2),var(--primary));color:var(--brand-on-primary)}
.cms-themed .stat.primary :is(small,.top small,.top span){color:var(--brand-on-primary)}
.cms-themed .stat .top span,.cms-themed .chip,.cms-themed .side-link.active,.cms-themed .side-link:hover,.cms-themed .settings-tabs a.active,.cms-themed .settings-tabs a:hover{background:color-mix(in srgb,var(--brand) 11%,var(--surface));color:var(--brand)}
.cms-themed :is(.eyebrow,.link,.table a.link){color:var(--brand)}
.cms-themed .side-link{color:var(--ink)}
.cms-themed .side-group,.cms-themed .help,.cms-themed .page-head p{color:var(--muted)}
.cms-themed :is(.input,select,textarea){background:var(--surface);color:var(--ink);border-color:var(--line)}
.cms-themed :is(.btn:not(.secondary):not(.danger),.theme-preview-main button){background:var(--brand);border-color:var(--brand);color:var(--brand-on-primary)}
.cms-themed .btn.secondary{background:var(--surface);border-color:var(--line);color:var(--ink)}
.cms-themed .brand-glyph{background:var(--brand);color:var(--brand-on-primary)}
.cms-themed .avatar{background:linear-gradient(135deg,var(--primary2),var(--primary));color:var(--brand-on-primary)}
.cms-themed :is(.settings-tabs,.panel,.card,.icon-btn,.upload-zone,.media-card){border-color:var(--line)}
.cms-themed .upload-zone{background:color-mix(in srgb,var(--brand) 3%,var(--surface))}
.cms-themed .table thead th{background:color-mix(in srgb,var(--brand) 4%,var(--surface))}
.cms-themed .table tbody tr:hover{background:color-mix(in srgb,var(--brand) 4%,var(--surface))}
.cms-themed .chart-line{stroke:var(--brand)}
.cms-themed .chart-fill{fill:color-mix(in srgb,var(--brand) 10%,transparent)}
.cms-themed .chart-gridline{stroke:var(--line)}
.cms-themed .donut{background:conic-gradient(var(--brand) 0 var(--published,0%),var(--line) var(--published,0%) 100%)}
.cms-themed .donut:after{background:var(--surface)}
.cms-themed .stat.primary .top span{background:color-mix(in srgb,var(--brand-on-primary) 18%,transparent)}
.cms-themed :is(.badge,.chip){color:var(--brand)}
/* Consistent brand mark: logo + visible title/subtitle */
.brand-logo-glyph{overflow:hidden;position:relative}
.brand-logo-glyph img{display:block;width:100%;height:100%;object-fit:contain;background:var(--surface);border-radius:inherit;padding:3px}
.side-brand{gap:12px}
.side-brand >div{min-width:0;overflow:hidden}
.side-brand b{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.side-brand small{letter-spacing:.07em;line-height:1.5}
.brand-lockup{display:flex;align-items:center;gap:12px;min-width:0;max-width:100%}
.brand-lockup .brand-uploaded-logo{width:auto;max-width:min(var(--brand-logo-width,72px),220px);height:auto;max-height:72px;object-fit:contain;flex:0 0 auto}
.brand-lockup .brand-name{display:block;max-width:100%;min-width:0;overflow-wrap:anywhere;color:var(--ink)}
.brand-lockup .brand-name small{color:var(--brand);font-size:9px}
.cms-themed .brand-sign{background:var(--brand);color:var(--brand-on-primary)}
.cms-themed .brand-sign span,.cms-themed .footer-name span{color:var(--accent)}
/* Frontend */
.newsroom .top-strip{background:var(--primary2);color:#fff}
.newsroom .status-pulse{background:var(--accent);box-shadow:0 0 0 3px color-mix(in srgb,var(--accent) 20%,transparent)}
.newsroom .site-header,.newsroom .nav-wrapper{background:var(--surface);border-color:var(--line)}
.newsroom :is(.editor-link,.mobile-trigger,.story-card,.rank-story,.article-sidebar,.side-block,.lead-side,.category-tile){border-color:var(--line)}
.newsroom :is(.desktop-nav a:hover,.desktop-nav .nav-home,.story-category,.rank-num,.section-heading small,.category-tile small){color:var(--brand)}
.newsroom :is(.nav-search button,.mobile-nav button,.pill-button,.newsletter-section button){background:var(--brand);color:var(--brand-on-primary)}
.newsroom .brand-name{color:var(--ink)}
.newsroom .site-footer{background:var(--primary2);color:#fff}
.newsroom .reading-progress{background:var(--accent)}
.newsroom .category-tile:hover{border-color:var(--brand)}
.newsroom .feature-dark{background:linear-gradient(180deg,transparent 15%,rgba(6,16,21,.78) 100%)}
.newsroom .hero-empty,.newsroom .promo-band{background:linear-gradient(135deg,var(--primary2),var(--primary))}
.newsroom .lead-feature:not(:has(img)) .lead-caption{color:#fff}
.newsroom .side-feature-empty span,.newsroom .feature-label{color:var(--accent)}
.header-compact .masthead{min-height:74px}
.header-compact .brand-lockup .brand-uploaded-logo{max-height:54px}
.header-compact .brand-sign{width:47px;height:47px;font-size:28px}
.header-compact .brand-name{font-size:28px}
.hero-style-wide.lead-layout{grid-template-columns:minmax(0,1fr)}
.hero-style-wide .lead-feature{min-height:490px}
.hero-style-wide .lead-side{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hero-style-wide .lead-side-heading{grid-column:1/-1}
/* Login has exact same tokens */
.auth-body{background:var(--paper)}
.auth-feature{background:radial-gradient(circle at 80% 10%,color-mix(in srgb,var(--accent) 15%,transparent),transparent 34%),linear-gradient(145deg,var(--primary2),var(--primary));color:#fff}
.auth-form-side{background:var(--paper)}
.auth-card{background:var(--surface);border-color:var(--line)}
.auth-feature .eyebrow{color:color-mix(in srgb,var(--accent) 70%,white)!important}
.auth-mark.auth-brand-lockup{display:flex;align-items:center;gap:12px;font-size:24px;line-height:1.12}
.auth-brand-logo{width:62px;height:62px;object-fit:contain;background:var(--surface);border-radius:11px;padding:5px}
.auth-brand-symbol{width:50px;height:50px;flex:0 0 auto;display:grid;place-items:center;border:1px solid #ffffff66;border-radius:11px;background:#ffffff25;color:#fff;font-size:20px}
.auth-brand-lockup small{display:block;margin-top:6px;letter-spacing:.15em;font-size:9px;font-weight:700;opacity:.78}
/* Appearance Settings */
.theme-presets{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:9px;margin:13px 0 17px}
.theme-preset{display:flex;align-items:center;gap:8px;padding:11px;border:1px solid var(--line);border-radius:11px;background:var(--surface);font:inherit;font-size:11px;font-weight:700;cursor:pointer;text-align:left;color:var(--ink)}
.theme-preset.active,.theme-preset:hover{border-color:var(--brand);box-shadow:0 0 0 2px color-mix(in srgb,var(--brand) 12%,transparent)}
.theme-preset-circle{width:23px;height:23px;border-radius:8px;flex:none;border:1px solid #00000016}
.theme-mode-group{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin-bottom:18px}
.theme-mode-choice{display:flex;align-items:flex-start;gap:10px;border:1px solid var(--line);border-radius:12px;padding:13px;background:var(--surface);cursor:pointer}
.theme-mode-choice input{accent-color:var(--brand);margin:3px 0}
.theme-mode-choice strong{display:block;font-size:12px;font-weight:800;margin-bottom:4px}
.theme-mode-choice small{display:block;font-size:11px;font-weight:450;line-height:1.5;color:var(--muted)}
.theme-controls{gap:15px 19px}
.theme-controls>label{margin-bottom:0}
.theme-color-control{display:flex;align-items:center;gap:10px;margin-top:7px}
.theme-color-control input[type=color]{width:58px;height:45px;border:1px solid var(--line);padding:4px;border-radius:10px;background:var(--surface);cursor:pointer}
.theme-color-control output{color:var(--muted);font:600 12px/1.3 ui-monospace,SFMono-Regular,monospace}
.theme-custom-colors{display:contents}
.theme-custom-colors[hidden]{display:none!important}
.theme-live-preview{--preview-primary:var(--brand);--preview-ink:var(--ink);--preview-bg:var(--paper);--preview-surface:var(--surface);--preview-line:var(--line);--preview-on:var(--brand-on-primary);border:1px solid var(--preview-line);background:var(--preview-bg);border-radius:15px;overflow:hidden;margin:21px 0 16px;box-shadow:0 12px 30px #092b2920}
.theme-preview-header{padding:14px 17px;background:var(--preview-surface);border-bottom:1px solid var(--preview-line);display:flex;justify-content:space-between;align-items:center;gap:15px}
.theme-preview-header span{font-weight:850;font-size:14px;color:var(--preview-ink)}
.theme-preview-header i{font-style:normal;font-size:9px;letter-spacing:.12em;color:var(--preview-primary);font-weight:850}
.theme-preview-columns{display:grid;grid-template-columns:130px minmax(0,1fr);min-height:190px}
.theme-preview-sidebar{padding:13px;background:var(--preview-surface);border-right:1px solid var(--preview-line);display:grid;align-content:start;gap:8px;color:var(--preview-ink);font-size:10px;font-weight:700}
.theme-preview-sidebar>div{padding:10px;border-radius:8px}
.theme-preview-active{background:color-mix(in srgb,var(--preview-primary) 10%,var(--preview-surface));color:var(--preview-primary)}
.theme-preview-main{padding:18px;color:var(--preview-ink)}
.theme-preview-kicker{font-size:9px;letter-spacing:.1em;font-weight:800;color:var(--preview-primary)}
.theme-preview-main>strong{display:block;margin:7px 0 6px;font-size:17px}
.theme-preview-main>p{font-size:11px;line-height:1.5;color:var(--preview-ink);opacity:.65;margin:0 0 10px}
.theme-preview-cards{display:flex;gap:8px;margin:10px 0}
.theme-preview-cards span{width:85px;height:26px;background:var(--preview-surface);border:1px solid var(--preview-line);border-radius:8px}
.theme-preview-cards span:first-child{background:var(--preview-primary);border-color:transparent}
.theme-preview-main button{border:0;padding:8px 14px;border-radius:9px;background:var(--preview-primary);color:var(--preview-on);font-size:10px;font-weight:800}
.brand-settings-preview,.brand-options-grid{display:grid;gap:14px}
.brand-settings-preview{display:flex;align-items:center;gap:15px;border:1px solid var(--line);border-radius:13px;padding:15px;margin:8px 0 18px;background:color-mix(in srgb,var(--brand) 4%,var(--surface))}
.brand-preview-logo{width:70px;height:70px;border-radius:12px;display:grid;place-items:center;background:var(--brand);color:var(--brand-on-primary);overflow:hidden;font-weight:900;font-size:22px}
.brand-preview-logo img{width:100%;height:100%;object-fit:contain;background:var(--surface)}
.brand-settings-preview strong{font-size:22px;display:block;overflow-wrap:anywhere}
.brand-settings-preview small{display:block;font-size:10px;letter-spacing:.13em;margin-top:6px;color:var(--muted)}
.brand-upload-preview{height:68px;width:110px;object-fit:contain;background:var(--surface);border:1px solid var(--line);padding:6px;border-radius:9px}
.brand-options-grid{grid-template-columns:repeat(2,minmax(0,1fr));margin:18px 0}
.brand-options-grid label{margin:0}
.brand-options-grid .brand-option-wide{grid-column:1/-1}
.brand-options-grid .setting-check{display:flex;align-items:center;gap:9px;background:color-mix(in srgb,var(--brand) 4%,var(--surface));padding:13px;border:1px solid var(--line);border-radius:11px}
.brand-options-grid .setting-check input{accent-color:var(--brand);width:17px;height:17px;margin:0;flex:none}
.settings-explain{border:1px solid var(--line);background:color-mix(in srgb,var(--brand) 4%,var(--surface));padding:13px 15px;border-radius:11px;font-size:11px;line-height:1.6;color:var(--ink);margin:16px 0}
.settings-explain a{text-decoration:underline;color:var(--brand);font-weight:800}
/* SVG background patterns use CSS drawing without external dependency */
.theme-pattern-dots{background-image:radial-gradient(color-mix(in srgb,var(--brand) 12%,transparent) 1px,transparent 1px);background-size:24px 24px}
.theme-pattern-grid{background-image:linear-gradient(color-mix(in srgb,var(--brand) 5%,transparent) 1px,transparent 1px),linear-gradient(90deg,color-mix(in srgb,var(--brand) 5%,transparent) 1px,transparent 1px);background-size:34px 34px}
.theme-pattern-lines{background-image:repeating-linear-gradient(148deg,transparent 0 100px,color-mix(in srgb,var(--brand) 5%,transparent) 100px 101px,transparent 101px 185px)}
.theme-motion-none *, .theme-motion-none *:before,.theme-motion-none *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}
@media(prefers-reduced-motion:reduce){.cms-themed *, .cms-themed *:before,.cms-themed *:after{animation:none!important;transition:none!important;scroll-behavior:auto!important}}
@media(max-width:850px){.theme-presets{grid-template-columns:repeat(2,minmax(0,1fr))}.theme-mode-group{grid-template-columns:1fr}.brand-options-grid{grid-template-columns:1fr}.hero-style-wide .lead-side{grid-template-columns:1fr}}
@media(max-width:550px){.theme-presets{grid-template-columns:1fr 1fr}.theme-preset{font-size:10px;padding:9px;gap:6px}.theme-preview-columns{grid-template-columns:85px minmax(0,1fr)}.theme-preview-sidebar{padding:7px}.theme-preview-main{padding:12px}.brand-lockup .brand-name{font-size:21px}.brand-lockup .brand-name small{font-size:8px}.brand-lockup .brand-uploaded-logo{max-width:min(var(--brand-logo-width,72px),80px)!important;max-height:54px}.auth-brand-logo{width:48px;height:48px}}

/* Bright brand colors use a deeper shade for text while preserving the original primary on filled buttons. */
.cms-themed :is(.eyebrow,.link,.table a.link,.section-heading small,.category-tile small,.story-category,.rank-num){color:var(--brand-text)}
.cms-themed .side-link.active,.cms-themed .side-link:hover,.cms-themed .settings-tabs a.active,.cms-themed .settings-tabs a:hover,.cms-themed .chip{color:var(--brand-text)}
.cms-themed .theme-preview-kicker,.cms-themed .theme-preview-header i{color:var(--brand-text)}
