:root{
  --bg:#0d1521;
  --panel:rgba(255,255,255,.08);
  --panel2:rgba(255,255,255,.12);
  --panelHover:rgba(255,255,255,.14);
  --border:rgba(255,255,255,.15);
  --text:rgba(255,255,255,.95);
  --muted:rgba(255,255,255,.70);
  --accent:#8b5cf6;
  --accentHover:#a78bfa;
  --radius:20px;
  --gap:16px;
  --shadow:0 8px 32px rgba(0,0,0,.4), 0 2px 8px rgba(0,0,0,.2);
  --shadowHover:0 12px 48px rgba(0,0,0,.5), 0 4px 12px rgba(0,0,0,.3);

  --padCard:16px;
  --padItem:12px;
  --fontItem:14px;
  --lineItem:1.4;
  
  /* Site-wide horizontal margin/padding standard - used for topbar and page content */
  --site-h-margin: 32px;
}

[data-theme="light"]{
  --bg:#f8fafc;
  --panel:rgba(0,0,0,.05);
  --panel2:rgba(0,0,0,.08);
  --panelHover:rgba(0,0,0,.10);
  --border:rgba(0,0,0,.12);
  --text:rgba(0,0,0,.90);
  --muted:rgba(0,0,0,.60);
  --accent:#6366f1;
  --accentHover:#818cf8;
  --shadow:0 8px 32px rgba(0,0,0,.12), 0 2px 8px rgba(0,0,0,.08);
  --shadowHover:0 12px 48px rgba(0,0,0,.16), 0 4px 12px rgba(0,0,0,.10);
}

[data-density="compact"]{ --gap:12px; --padCard:12px; --padItem:10px; --fontItem:13px; --lineItem:1.3; }
[data-density="cozy"]{ --gap:16px; --padCard:16px; --padItem:12px; --fontItem:14px; --lineItem:1.4; }
[data-density="comfortable"]{ --gap:20px; --padCard:20px; --padItem:14px; --fontItem:15px; --lineItem:1.5; }

/* Font size multipliers - uses CSS variables for proper cascading */
[data-font-size="small"]{ 
  --font-multiplier: 0.875;
  font-size:13px; 
}
[data-font-size="normal"]{ 
  --font-multiplier: 1.0;
  font-size:15px; 
}
[data-font-size="large"]{ 
  --font-multiplier: 1.15;
  font-size:17px; 
}

*{box-sizing:border-box}
html{
  scroll-behavior:smooth;
}
/* Custom scrollbar styling */
::-webkit-scrollbar {
  width:6px;
}
::-webkit-scrollbar-track {
  background:transparent;
}
::-webkit-scrollbar-thumb {
  background:rgba(255,255,255,0.25);
  border-radius:3px;
}
::-webkit-scrollbar-thumb:hover {
  background:rgba(255,255,255,0.40);
}
html,body{height:100%}
body{
  margin:0;
  padding:100px var(--site-h-margin) 32px var(--site-h-margin);
  font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,"Helvetica Neue",Arial,sans-serif;
  background:
    radial-gradient(1000px 700px at 15% 10%, rgba(139,92,246,.25), transparent 65%),
    radial-gradient(1000px 700px at 85% 15%, rgba(99,102,241,.20), transparent 60%),
    radial-gradient(1000px 700px at 55% 90%, rgba(16,185,129,.15), transparent 60%),
    var(--bg);
  color:var(--text);
  transition:background 0.3s ease;
}

.container{
  max-width:1550px;
  margin:0 auto;
  padding:20px 0 32px;
  animation:fadeIn 0.4s ease-out;
  width:100%;
}

@keyframes fadeIn{
  from{opacity:0;transform:translateY(8px)}
  to{opacity:1;transform:translateY(0)}
}

a{color:inherit;transition:color 0.2s ease}
h1{margin:0;font-size: calc(24px * var(--font-multiplier, 1));font-weight:800;letter-spacing:-0.3px;line-height:1.2}
h2{margin:0;font-size: calc(16px * var(--font-multiplier, 1));font-weight:700;letter-spacing:-0.2px}
.sub{margin-top:6px;color:var(--muted);font-size: calc(13px * var(--font-multiplier, 1));font-weight:600;line-height:1.4}
.hint{color:var(--muted);font-size: calc(12px * var(--font-multiplier, 1));font-weight:600;line-height:1.5}


.header#topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:999;
  backdrop-filter:blur(20px) saturate(180%);
  -webkit-backdrop-filter:blur(20px) saturate(180%);
  background:linear-gradient(to bottom, rgba(0,0,0,.40), rgba(0,0,0,.15));
  border-bottom:1px solid rgba(255,255,255,.10);
  transition:all 0.3s ease;
}
.topClockLink .topClock{ cursor:pointer; }

.topClockLink:focus-visible .topClock{
  outline:2px solid var(--accent);
  outline-offset:3px;
}

/* Topbar layout */
header#topbar .pageHeadActions{
  display:none; /* hidden, clock moved to topbarInner */
}

/* Topbar clock polish */
.topClock{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  justify-content:center;
  padding:8px 12px;
  border-radius:12px;
  line-height:1.1;
  font-variant-numeric: tabular-nums;
}

.topRight{
  display:flex;
  align-items:center;
  gap:20px;
}

.topWeather{
  display:flex;
  align-items:center;
  gap:8px;
}

.weatherIcon{
  font-size:40px;
  flex-shrink:0;
}

.weatherInfo{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.weatherTemp{
  font-size:22px;
  font-weight:700;
}

.weatherRange{
  font-size:13px;
  opacity:0.75;
  font-weight:600;
}

.weatherLoc{
  font-size:12px;
  opacity:0.70;
  font-weight:600;
}

.topClockDate{
  font-size:18px;
  font-weight:700;
  opacity:0.80;
  margin-bottom:3px;
}

.topClockTime{
  font-weight:900;
  font-variant-numeric: tabular-nums; /* prevents "wiggle" */
  letter-spacing:0.5px;
  font-size:24px;
  margin-bottom:2px;
}

.topClockTz{
  font-size:11px;
  font-weight:700;
  opacity:0.75;
}

.brand{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:240px;
  transition:transform 0.2s ease;
  text-decoration:none;
  color:inherit;
  outline:none;
}
.brand:hover{transform:translateX(2px)}
.brand:focus{
  outline:2px solid var(--accent);
  outline-offset:4px;
  border-radius:8px;
}
.dot{
  width:14px;
  height:14px;
  border-radius:999px;
  background:linear-gradient(135deg, var(--accent), var(--accentHover));
  box-shadow:0 0 20px rgba(139,92,246,.6), 0 0 40px rgba(139,92,246,.3);
  animation:pulse 2s ease-in-out infinite;
}
@keyframes pulse{
  0%,100%{opacity:1;transform:scale(1)}
  50%{opacity:0.8;transform:scale(1.05)}
}
.brandTitle{font-size:24px;font-weight:800;letter-spacing:-0.2px;line-height:1.2}
.brandSub{margin-top:3px;color:var(--muted);font-size:18px;font-weight:600;line-height:1.3}

.navCenter{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  flex:1;
  min-width:300px;
}

.searchForm{
  width:100%;
  max-width:400px;
  display:flex;
  align-items:center;
  gap:8px;
}

.ddgLogo{
  font-size:18px;
  opacity:0.80;
  flex-shrink:0;
}

.searchBar{
  width:100%;
  max-width:400px;
  padding:10px 16px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--text);
  border-radius:20px;
  font-size:13px;
  font-weight:500;
  outline:none;
  transition:all 0.2s ease;
}

.searchBar::placeholder{
  color:var(--muted);
}

.searchBar:focus{
  background:var(--panel2);
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(139,92,246,.15);
}

.nav{
  display:flex;
  gap:12px;
  flex-wrap:wrap;
  align-items:center;
  justify-content:center;
}

.navMain{
  display:flex;
  gap:12px;
  align-items:center;
}

.navSettings{
  display:flex;
  align-items:center;
}

.nav a{
  text-decoration:none;
}

.btn{
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--text);
  border-radius:999px;
  padding:10px 16px;
  cursor:pointer;
  font-weight:600;
  font-size:13px;
  display:inline-flex;
  gap:8px;
  align-items:center;
  transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  white-space:nowrap;
  position:relative;
  overflow:hidden;
  outline:none;
}

.btnMain{
  padding:12px 24px;
  font-size: calc(15px * var(--font-multiplier, 1));
  font-weight:700;
}

.btnSettings{
  padding:8px 14px;
  font-size:12px;
  font-weight:600;
}

.btn:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

.btn::before{
  content:"";
  position:absolute;
  top:0;
  left:-100%;
  width:100%;
  height:100%;
  background:linear-gradient(90deg, transparent, rgba(255,255,255,.1), transparent);
  transition:left 0.5s ease;
}
.btn:hover::before{left:100%}
.btn:hover{
  background:var(--panelHover);
  border-color:rgba(255,255,255,.20);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,.15);
}
.btn:active{transform:translateY(0);box-shadow:0 2px 6px rgba(0,0,0,.1)}
.btnSubtle{background:rgba(255,255,255,.06);font-weight:600}
.btnActive{
  padding:14px 28px;
  font-size:16px;
  background:var(--accent);
  border-color:var(--accent);
  color:#fff;
}
.btnActive:hover{
  background:var(--accentHover);
  border-color:var(--accentHover);
}

.btnDisabled{
  opacity:0.72;
  cursor:default;
  pointer-events:none;
}

.pageHead{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  margin-bottom:12px;
  margin-top:4px;
  padding:0;
}
.pageHead > div:first-child{
  display:flex;
  flex-direction:row;
  gap:12px;
  align-items:baseline;
}
.pageHead h1{
  margin:0;
  font-size:24px;
  font-weight:800;
}
.pageHead .sub{
  color:var(--muted);
  font-size:11px;
  font-weight:600;
}
.pageHead .sub .subLink{
  color:var(--accentHover);
  text-decoration:none;
  font-weight:800;
}
.pageHead .sub .subLink:hover,
.pageHead .sub .subLink:focus-visible{
  color:var(--accent);
  text-decoration:underline;
}
.pageHeadActions{
  display:flex;
  gap:10px;
  align-items:center;
  flex-wrap:wrap;
  margin-right:0;
}

.page-footer{
  padding:24px;
  background:var(--card-bg);
  border-top:1px solid var(--border);
  margin-top:32px;
  text-align:center;
}
.page-footer p{
  margin:0;
  font-size:12px;
  color:var(--muted);
  line-height:1.6;
}

.infoBar{
  display:grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) minmax(0, 1fr);
  gap:12px;
  margin-bottom:0;
  margin-left:calc(50% - 50vw);
  margin-right:calc(50% - 50vw);
  padding:12px 16px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  box-shadow:0 2px 8px rgba(0,0,0,.1);
  align-items:center;
  width:100vw;
}

.infoBarWidget{
  display:flex;
  align-items:center;
  gap:10px;
  padding:8px 12px;
  background:rgba(255,255,255,.04);
  border-radius:12px;
  border:1px solid var(--border);
  transition:all 0.2s ease;
  min-width:0;
}

.selectInline{ width:auto; min-width:190px; }


.weatherMain {
  display: flex;
  flex-direction: row;
  gap: var(--gap);
  width: 100%;
  min-width: 0;
}

@media (max-width:980px) {
  .weatherMain { flex-direction: column; }
}

/* Weather grid layout for HAPPENING NOW */
.weatherGrid{
  display:grid;
  grid-template-columns: 1fr 1.15fr;
  gap:var(--gap);
  align-items:start;
}
.weatherGrid .col{ display:flex; flex-direction:column; gap:var(--gap) }
.weatherGrid .leftCol{ min-width:280px }
.weatherGrid .rightCol{ min-width:360px }

/* Alerts bar (top of weather page) */
.alertsBar{
  margin-left:0;
  margin-right:-20px;
  width:calc(100% + 20px);
  overflow:hidden;
  background:linear-gradient(90deg, rgba(255,255,255,.02), rgba(255,255,255,.01));
  border:1px solid var(--border);
  padding:8px 12px;
  margin-bottom:12px;
  border-radius:12px;
  color:var(--muted);
  font-weight:700;
  white-space:nowrap;
}

/* Marquee / ticker */
.alertsTickerEmpty{
  display:inline-block;
  color:var(--muted);
  font-weight:700;
}

.alertsBar .alertsTickerViewport{
  overflow:hidden;
  width:100%;
  cursor:grab;
  -webkit-user-select:none;
  user-select:none;
  touch-action:pan-y;
}

.alertsBar .alertsTickerViewport.isDragging{
  cursor:grabbing;
}

.alertsBar .alertsTickerTrack{
  display:flex;
  align-items:center;
  gap:18px;
  width:max-content;
  will-change:transform;
}

.alertsBar .alertsTickerGroup{
  display:flex;
  align-items:center;
  gap:0;
  white-space:nowrap;
}

.alertsBar .alertItem{
  display:inline-flex;
  align-items:center;
  font-weight:800;
  letter-spacing:0.1px;
  text-shadow:0 1px 1px rgba(0,0,0,0.28);
}

.alertsBar .alertItem.alertToneA{
  color:#ffffff;
}

.alertsBar .alertItem.alertToneB{
  color:#fcd34d;
}

[data-theme="light"] .alertsBar .alertItem.alertToneA{
  color:#0f172a;
}

[data-theme="light"] .alertsBar .alertItem.alertToneB{
  color:#9a3412;
}

.alertsBar .alertSep{
  color:rgba(255,255,255,0.42);
  margin:0 10px;
  font-weight:700;
}

.localAlertBadge{
  display:inline-block;
  padding:2px 8px;
  margin-right:4px;
  background:linear-gradient(135deg, rgba(239,68,68,.9), rgba(220,38,38,.85));
  color:#fff;
  font-weight:800;
  font-size:11px;
  letter-spacing:0.5px;
  border-radius:4px;
  text-transform:uppercase;
  box-shadow:0 2px 6px rgba(239,68,68,.4);
}

.alertHoverPopup{
  position:fixed;
  z-index:9999;
  max-width:400px;
  padding:16px;
  background:rgba(30,30,40,0.75);
  backdrop-filter:blur(12px) saturate(150%);
  -webkit-backdrop-filter:blur(12px) saturate(150%);
  border:1px solid rgba(255,255,255,0.2);
  border-radius:12px;
  box-shadow:0 8px 32px rgba(0,0,0,.5);
  color:var(--text);
  font-size:14px;
  line-height:1.5;
  pointer-events:auto;
  animation:alertPopupIn 0.15s ease-out;
}
.alertHoverPopup .popupTitle{
  font-weight:800;
  font-size: calc(15px * var(--font-multiplier, 1));
  margin-bottom:8px;
}
.alertHoverPopup .popupMeta{
  color:var(--muted);
  font-size: calc(12px * var(--font-multiplier, 1));
  margin-bottom:8px;
}
.alertHoverPopup .popupDesc{
  margin-bottom:12px;
}
.alertHoverPopup .popupLink{
  display:inline-block;
  padding:8px 14px;
  background:var(--accent);
  color:#fff;
  border-radius:8px;
  text-decoration:none;
  font-weight:600;
  font-size:13px;
  transition:all 0.2s ease;
}
.alertHoverPopup .popupLink:hover{
  background:var(--accentHover);
  transform:translateY(-1px);
}

/* Alert details page */
.alertMetaGrid{
  display:grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap:12px;
  margin-bottom:16px;
}
.alertMetaItem{
  background:rgba(255,255,255,.04);
  border:1px solid var(--border);
  border-radius:10px;
  padding:10px 12px;
}
.alertMetaLabel{
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:0.6px;
  margin-bottom:6px;
}
.alertMetaValue{
  font-size:14px;
  font-weight:700;
  color:var(--text);
}
.alertBody{
  display:flex;
  flex-direction:column;
  gap:16px;
}
.alertSection h3{
  margin:0 0 8px 0;
  font-size:14px;
  font-weight:800;
}
.alertSectionBody{
  color:var(--text);
  line-height:1.6;
}
.alertActions{
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  margin-top:16px;
}
@keyframes alertPopupIn{
  from{ opacity:0; transform:translateY(-8px); }
  to{ opacity:1; transform:translateY(0); }
}

@keyframes hnTicker{
  0%{ transform: translateX(0%); }
  100%{ transform: translateX(-100%); }
}

/* Alerts card should visually match current card height by default */
.weatherAlertsCard{ display:flex; flex-direction:column }
.weatherAlertsCard .cardBody{ padding:12px }

@media (max-width:980px){
  .weatherGrid{ grid-template-columns: 1fr; }
}

.weatherWidget.tempHot{
  background:linear-gradient(135deg, rgba(239,68,68,.15), rgba(248,113,113,.08)) !important;
  border-color:rgba(239,68,68,.3) !important;
}

/* HAPPENING NOW topbar (isolated, non-invasive) */
.hn-topbar{
  position:fixed;
  top:0;
  left:0;
  right:0;
  z-index:999;
  display:block;
  width:100%;
  background:var(--panel);
  border-bottom:1px solid var(--border);
  transition:opacity 0.25s ease, background 0.25s ease, transform 0.18s ease;
  backdrop-filter: blur(8px) saturate(140%);
  padding:0 0 0 var(--site-h-margin);
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  --hn-separator-pad: 14px;
}
.hn-topbar .hn-inner{
  max-width:none;
  margin:0;
  width:calc(100% - var(--site-h-margin));
  padding:6px 0;
  display:flex;
  align-items:center;
  gap:8px;
}
.hn-brand{ display:flex; align-items:center; gap:8px; text-decoration:none; color:inherit; }
.hn-dot{ width:12px; height:12px; border-radius:999px; background:linear-gradient(135deg,var(--accent),var(--accentHover)); box-shadow:0 6px 24px rgba(0,0,0,.15); flex-shrink:0 }
.hn-brandText{ display:flex; flex-direction:column; line-height:1 }
.hn-title{ font-weight:800; font-size:18px }
.hn-sub{ font-size:12px; color:var(--muted); margin-top:2px }
.hn-nav{ display:flex; gap:2px; align-items:center; margin-left:8px; }
.hn-nav-link{ 
  color:var(--muted); 
  text-decoration:none; 
  font-weight:700;
  transition:all 0.2s ease;
  padding:2px 4px;
  border-radius:4px;
  position:relative;
}
.hn-nav-link:hover{ 
  color:var(--text); 
  background:rgba(255,255,255,0.08);
}
.hn-nav-link.active{
  color:#a78bfa;
  font-weight:800;
  text-decoration:underline;
  text-decoration-color:#a78bfa;
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  background:rgba(139,92,246,0.25);
  padding:4px 8px;
  text-shadow:0 0 8px rgba(167,139,250,0.6);
}
.hn-settings-link{
  text-decoration:none;
  opacity:0.8;
  transition:all 0.3s ease;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  padding:2px 6px;
  border-radius:4px;
}
.hn-settings-link.active{
  color:var(--accent);
  opacity:1;
  background:rgba(139,92,246,0.15);
  font-weight:700;
}
.hn-settings-link:hover{
  opacity:1;
  color:var(--text);
  background:rgba(255,255,255,0.08);
  transform:rotate(90deg);
}
.hn-settings-link.active{
  opacity:1;
  color:var(--accent);
  font-weight:800;
  text-decoration:underline;
  text-decoration-color:var(--accent);
  text-decoration-thickness:2px;
  text-underline-offset:3px;
  transform:rotate(180deg);
  filter:drop-shadow(0 0 4px rgba(139,92,246,0.6));
}
.hn-actions{ display:flex; gap:6px; align-items:center; flex-shrink:0; }
.hn-actions:empty{ display:none; }
.hn-slot{ min-width:36px; min-height:36px; display:flex; align-items:center; justify-content:center }
.hn-slot:empty{ display:none; min-width:0; min-height:0; }

/* Hamburger menu styling */
.hn-hamburger{
  display:none;
  background:none;
  border:none;
  width:40px;
  height:40px;
  padding:0;
  cursor:pointer;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:5px;
  color:var(--text);
  transition:all 0.3s ease;
  flex-shrink:0;
  margin-right:8px;
}
.hn-hamburger span{
  width:24px;
  height:2px;
  background:var(--text);
  border-radius:2px;
  transition:all 0.3s ease;
  display:block;
}
.hn-hamburger:hover span{
  background:var(--accent);
}

/* Mobile menu */
.hn-mobile-menu{
  display:none;
  position:absolute;
  top:100%;
  left:0;
  right:0;
  background:var(--panel);
  border-bottom:1px solid var(--border);
  max-height:0;
  overflow:hidden;
  transition:max-height 0.3s ease;
  z-index:998;
}
.hn-mobile-menu.open{
  max-height:400px;
}
.hn-mobile-nav{
  display:flex;
  flex-direction:column;
  gap:2px;
  padding:8px 16px;
}
.hn-mobile-nav .hn-nav-link{
  padding:10px 8px;
  text-align:left;
}

.hn-host-search{ display:flex; }

/* Ensure topbar styles are compact and do not affect other header styles */
header#topbar{ padding:0; width:100%; }

/* Topbar search */
.hn-rowTop{ 
  display:flex; 
  align-items:center; 
  gap:0; 
  padding:4px 0; 
  width:100%;
  justify-content:flex-start;
  min-width:0;
}
.hn-brand{ 
  display:flex;
  align-items:center;
  gap:8px;
  flex:0 0 auto;
  min-width:0;
  text-decoration:none;
  color:inherit;
  padding:0 var(--hn-separator-pad);
  border-right:1px solid rgba(255,255,255,0.15);
}
.hn-nav-section{
  display:flex;
  gap:2px;
  align-items:center;
  flex:0 0 auto;
  min-width:0;
  padding:0 var(--hn-separator-pad);
  border-right:1px solid rgba(255,255,255,0.15);
}
.hn-nav-section .hn-nav-link{
  color:var(--muted);
  text-decoration:none;
  font-weight:700;
  padding:2px 3px;
  font-size:13px;
  transition:all 0.2s ease;
  border-radius:4px;
}
.hn-time-section{ 
  display:flex; 
  align-items:center; 
  gap:12px; 
  flex:0 0 auto;
  min-width:0;
  padding:0 var(--hn-separator-pad);
  border-right:1px solid rgba(255,255,255,0.15);
}
.hn-time-display{ 
  display:flex; 
  flex-direction:column;
  align-items:center; 
  gap:2px; 
  font-size:16px; 
  font-weight:600; 
}
.hn-time-display .time-value{ 
  font-weight:800;
  font-size:20px;
}
.hn-time-display .time-date{ 
  font-size:12px; 
  color:var(--muted); 
}
.hn-host-search{ 
  display:flex;
  flex:1 1 320px;
  width:auto;
  min-width:180px;
  max-width:360px;
  padding:0 var(--hn-separator-pad);
  border-right:1px solid rgba(255,255,255,0.15);
}
.hn-host-weather{ 
  display:flex;
  flex:0 1 360px;
  width:100%;
  min-width:230px;
  max-width:360px;
  padding:0 0 0 var(--hn-separator-pad);
}
.hn-rowSearch{ display:none }
.hn-search{ display:flex; align-items:center; gap:8px; width:100%; }
.hn-search .searchBar{ flex:1; height:36px; padding:8px 12px; border-radius:999px; border:1px solid var(--border); background:var(--panel); color:var(--text); font-size:14px; text-align:center; }
.hn-search .searchBar::placeholder{ color:var(--muted); text-align:center; }
.hn-search .searchBar:focus{ text-align:left; }
.hn-search .searchBar:focus::placeholder{ text-align:left; }

.hn-inlineSearch{ width:100%; }

.hn-host-clock .timeWidget{
  background:rgba(255,255,255,0.03);
  border-radius:10px;
  padding:6px 10px;
  min-width:170px;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.hn-host-clock .timeWidget .timeWidgetTime{ font-size:18px; font-weight:800; line-height:1.1; }
.hn-host-clock .timeWidget .timeWidgetDate{ font-size:11px; margin-top:2px; line-height:1.1; }
.hn-host-clock .timeWidget .timeWidgetCity{ font-size:12px; margin-top:2px; line-height:1.1; }

.hn-host-weather .weatherWidget{
  min-height:auto;
  width:100%;
  padding:8px 10px !important;
  gap:10px;
  max-width:100%;
}
.hn-host-weather .weatherWidgetIcon{ font-size:34px; }
.hn-host-weather .weatherWidget .weatherWidgetTemp{ font-size:18px; }
.hn-host-weather .weatherWidgetDesc{ font-size:12px; }
.hn-host-weather .weatherWidgetLocation{ font-size:11px; }
.hn-host-weather .weatherWidgetDetails{ gap:8px; }
.hn-host-weather .weatherDetail{ padding:2px 6px; }
.hn-host-weather .weatherDetailLabel{ font-size:10px; }
.hn-host-weather .weatherDetailValue{ font-size:11px; }
.hn-host-weather .precipSection{ display:flex; flex-direction:column; gap:3px; align-items:flex-start; }
.hn-host-weather .precipBar{ width:32px; height:4px; background:rgba(250,204,21,.25); border-radius:999px; overflow:hidden; }
.hn-host-weather .precipFill{ display:block; height:100%; background:linear-gradient(90deg, rgba(250,204,21,.8), rgba(250,204,21,.5)); border-radius:999px; }

/* Make stats widget visually unobtrusive */
.statsWidget{ background:transparent; border:0; color:var(--muted); font-size:12px; padding:6px 8px }
.statsWidget .statsWidgetLabel{ font-weight:600; opacity:0.8 }
.statsWidget .statsWidgetValue{ font-weight:700; color:var(--muted); opacity:0.9 }

/* Topbar embedded infoBar layout overrides (when inserted into header) */
.infoBarLeft{ display:flex; align-items:center; padding-left:0; flex-shrink:0; margin-right:0; min-width:0; justify-self:start; }
.infoBarCenter{ 
  display:flex; 
  flex-direction:column; 
  align-items:center; 
  justify-content:center; 
  gap:6px; 
  width:100%;
  margin:0;
  min-width:0;
  justify-self:center;
}
.infoBarCenter > * {
  width:100%;
  max-width:560px;
  margin-left:auto;
  margin-right:auto;
}
.infoBarRight{ 
  display:flex; 
  align-items:center; 
  padding-right:0;
  flex-shrink:0;
  margin-left:0;
  min-width:0;
  justify-self:end;
}
header#topbar > .infoBar{ 
  margin:0 auto;
  margin-left:auto;
  margin-right:auto;
  padding:6px 0; 
  background:transparent; 
  border:0; 
  display:grid; 
  grid-template-columns: 1fr minmax(280px, 640px) 1fr;
  align-items:center; 
  gap:12px; 
  position:relative; 
  width:100%;
  max-width:1550px;
}
header#topbar > .infoBar .infoBarLeft{ margin-right:0; justify-self:start; }
header#topbar > .infoBar .infoBarCenter{ justify-self:center; max-width:640px; margin:0; width:100%; }
header#topbar > .infoBar .infoBarRight{ margin-left:0; justify-self:end; }
.infoBarLeft .infoBarWidget{
  min-height:56px;
  padding-top:10px;
  padding-bottom:10px;
}
.infoBarRight .infoBarWidget{
  min-height:56px;
  padding-top:10px;
  padding-bottom:10px;
}
.timeWidget{ background:rgba(255,255,255,0.03); border-radius:8px; padding:8px 12px; min-width:180px }
.timeWidget .timeWidgetTime{ font-size:20px; font-weight:800; line-height:1.1 }
.timeWidget .timeWidgetDate{ font-size:12px; color:var(--muted); margin-top:2px; line-height:1.1 }
.timeWidget .timeWidgetCity{ font-size:14px; margin-top:2px; color:var(--muted); line-height:1.1 }

.infoBarSearch{ width:100%; }
.infoBarSearch .hn-search{ max-width:520px; width:100%; display:flex; justify-content:center; margin:0 auto; }
.infoBarSearch .searchBar{ font-size:16px; height:44px; padding:10px 14px; width:100%; flex:1; }

@media (max-width:980px){
  body{ padding-top:240px; }
  .hn-rowTop{ flex-wrap:wrap; gap:6px; max-width:100%; justify-content:flex-start; }
  .hn-widgets-group{ flex:1 1 100%; flex-wrap:wrap; gap:8px; justify-content:flex-start; }
  .hn-host-clock{ flex:1 1 auto; min-width:150px; }
  .hn-host-search{ flex:1 1 100%; min-width:0; order:3; }
  .hn-host-weather{ flex:1 1 100%; min-width:0; order:4; }
  .infoBar{ display:flex; flex-direction:column; align-items:stretch; width:100%; margin-left:0; margin-right:0; }
  .infoBarCenter{ flex:1; width:100%; }
  .infoBarLeft{ padding-left:0; margin-right:0; justify-content:center; }
  .infoBarRight{ padding-right:0; margin-left:0; justify-content:center; }
  header#topbar > .infoBar{ 
    display:flex; 
    flex-direction:column; 
    align-items:stretch; 
    padding:6px 0; 
    gap:6px;
  }
  .infoBarWidget{ width:100%; max-width:100%; padding:6px 10px; }
  .weatherWidget{ 
    display:grid !important;
    grid-template-columns: auto auto 1fr;
    gap:10px;
    padding:8px 12px !important;
    align-items:center;
  }
  .weatherWidgetIcon{ font-size:52px; line-height:1; grid-column:1; grid-row:1 / span 2; }
  .weatherWidgetContent{ 
    display:flex !important;
    flex-direction:column !important;
    gap:2px;
    align-items:flex-start;
    grid-column:2;
    grid-row:1 / span 2;
  }
  .weatherWidget .weatherWidgetTemp{ font-size:24px; margin-right:0; line-height:1.1; font-weight:800; }
  .weatherWidgetDesc{ font-size:13px; line-height:1.2; font-weight:600; }
  .weatherWidgetLocation{ font-size:11px; display:block !important; grid-column:3; grid-row:1; align-self:start; justify-self:end; }
  .weatherWidgetDetails{ 
    display:flex !important; 
    flex-direction:column !important; 
    gap:4px; 
    flex-wrap:nowrap;
    align-items:flex-end;
    grid-column:3;
    grid-row:2;
    align-self:start;
  }
  .weatherDetail{ padding:3px 7px; font-size:11px; }
  .weatherDetailLabel{ font-size:9px; }
  .weatherDetailValue{ font-size:11px; }
  .humiditySection{ display:flex !important; }
  .humiditySection{ display:none; }
  .timeWidget{ width:100%; max-width:100%; text-align:left; padding:6px 10px !important; }
  .timeWidget .timeWidgetTime{ font-size:18px; }
  .timeWidget .timeWidgetDate{ font-size:11px; }
  .timeWidget .timeWidgetCity{ font-size:11px; }
  .hn-topbar .hn-inner{ padding:6px 0; }
  .hn-rowTop{ padding:6px 0; }
}

@media (max-width:760px){
  body{ 
   padding-top:70px; 
    padding-left:12px;
    padding-right:12px;
  }
  
  header#topbar{
    top:0;
  }
  
  /* Topbar styling for mobile */
  .hn-topbar { 
    padding: 0; 
    position:fixed;
    top:0;
    left:0;
    right:0;
  }
  
  .pageHead{ flex-direction:row; align-items:center; justify-content:space-between; }
  .pageHead > div:first-child{ gap:8px; flex-direction:row; align-items:center; }
  
  /* Responsive topbar adjustments for small mobile */
  .hn-topbar .hn-inner{ 
    padding: 0 0; 
    gap: 0; 
    display:flex;
    align-items:stretch;
    width:100%;
    max-width:100%;
    margin:0;
    height:70px;
  }
  
  /* Hamburger positioned inline */
  .hn-hamburger{ 
    display:flex;
    position:relative;
    left:0;
    top:0;
    width:52px;
    height:100%;
    z-index:10;
    flex-shrink:0;
  }
  
  .hn-mobile-menu{ display:block; }
  
  /* Hide nav links, show in burger menu instead */
  .hn-nav-section{ display:none !important; }
  
  /* Adjust row for mobile layout */
  .hn-rowTop{ 
    display:flex;
    gap: 0;
    width:100%;
    max-width:100%;
    margin:0;
    padding:0;
    height:70px;
    align-items:center;
    justify-content:space-between;
  }
  
  /* Brand: Left section */
  .hn-brand{ 
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:0px;
    padding: 2px 2px;
    text-decoration:none !important;
    color:#4ade80;
    border-radius:0;
    background:transparent;
    min-height:auto;
    height:100%;
    border-right:none;
    flex:0 0 auto;
    min-width:auto;
    white-space:normal;
    width:auto;
  }
  .hn-brand .hn-dot{
    display:none;
  }
  .hn-title{ 
    font-size:13px; 
    font-weight:900;
    text-align:center;
    line-height:1.1;
    word-wrap:break-word;
    max-width:100px;
    text-decoration:none !important;
    letter-spacing:-0.4px;
    color:#4ade80;
  }
  
  /* Time display: vertical on mobile with date below */
  .hn-time-section{ 
    display:flex; 
    align-items:center; 
    justify-content:center;
    gap:0;
    flex-direction:column;
    padding: 2px 0px;
    height:100%;
    border-right:none;
    flex:0 0 auto;
    min-width:0;
    margin:0 auto 0 8px;
  }
  .hn-time-display{ 
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center; 
    font-size:12px; 
    gap:0px;
    width:100%;
  }
  .hn-time-display .time-value{ 
    font-size:16px;
    font-weight:900;
    line-height:1.0;
    letter-spacing:-0.5px;
    white-space:nowrap;
  }
  .hn-time-display .time-date{ 
    font-size:10px;
    color:var(--muted);
    font-weight:600;
    line-height:1.0;
    margin-top:0px;
  }
  
  /* Search: hide on tiny mobile */
  .hn-host-search{ 
    display:none !important;
  }
  
  /* Weather: show on right in mobile view */
  .hn-host-weather{ 
    display:flex !important;
    padding: 1px 1px !important;
    align-items:center;
    justify-content:center;
    height:100%;
    flex:0 1 auto;
    border-left:none;
    margin-left:auto;
    max-width:110px;
    overflow:hidden;
  }
  
  .hn-actions{ 
    display:none;
  }
  
  /* Compact time widget for mobile */
  .hn-host-clock .timeWidget{
    padding:0;
    min-width:auto;
    background:transparent;
    border:none;
  }
  .hn-host-clock .timeWidget .timeWidgetTime{ 
    font-size:14px; 
    font-weight:800;
  }
  .hn-host-clock .timeWidget .timeWidgetDate{ 
    font-size:9px;
    margin-top:0;
  }
  .hn-host-clock .timeWidget .timeWidgetCity{ display:none; }

  /* Weather widget for mobile - show icon, temp, and hi/lo */
  .hn-host-weather .weatherWidget{
    display:flex !important;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    gap:1px;
    padding:0 !important;
    background:transparent;
    border:none;
    min-height:auto;
    width:auto;
    height:100%;
    max-width:110px;
    overflow:hidden;
  }
  .hn-host-weather .weatherWidgetIcon{ 
    font-size:22px; 
    line-height:1;
    flex-shrink:0;
  }
  .hn-host-weather .weatherWidget .weatherWidgetTemp{ 
    font-size:17px;
    font-weight:900;
    line-height:1.0;
    letter-spacing:-0.5px;
  }
  .hn-host-weather .weatherWidgetRange{
    font-size:10px;
    font-weight:600;
    color:var(--muted);
    line-height:1.0;
  }
  .hn-host-weather .weatherWidgetDesc{ display:none; }
  .hn-host-weather .weatherWidgetLocation{ display:none; }
  .hn-host-weather .weatherWidgetDetails{ display:none !important; }
  .hn-host-weather .precipSection{ display:none !important; }
  .hn-host-weather .weatherWidgetContent{
    display:flex !important;
    flex-direction:column;
    gap:0px;
    align-items:center;
    justify-content:center;
    min-width:0;
    flex:0 0 auto;
  }
  /* Mobile menu styles */
  .hn-mobile-menu{ 
    position:fixed; 
    top:56px; 
    left:0; 
    right:0; 
    max-height:calc(100vh - 56px); 
    overflow-y:auto;
    background:var(--panel);
    border-bottom:1px solid var(--border);
    z-index:997;
    opacity:0;
    visibility:hidden;
    transform:translateY(-10px);
    transition:all 0.3s ease;
  }
  .hn-mobile-menu.open{ 
    opacity:1;
    visibility:visible;
    transform:translateY(0);
    box-shadow:0 4px 12px rgba(0,0,0,0.4);
    background:rgba(45, 42, 90, 0.98);
  }
  .hn-mobile-nav{ padding:16px 12px; }
  .hn-mobile-nav .hn-nav-link{ 
    padding:14px 18px; 
    display:block;
    font-size:15px;
    font-weight:600;
    border-radius:8px;
    margin-bottom:4px;
    color:var(--text);
    transition:all 0.2s ease;
  }
  .hn-mobile-nav .hn-nav-link:hover{ 
    background:var(--panel2); 
    color:var(--accent);
  }
  .hn-mobile-nav .hn-nav-link.active{
    color:var(--accent);
    font-weight:700;
    background:rgba(139,92,246,0.15);
  }
  
  /* Extra compact weather widget for small mobile */
  .infoBarWidget{ padding:5px 8px; }
  .infoBarLeft .infoBarWidget{ min-height:auto; }
  .infoBarRight .infoBarWidget{ min-height:auto; }
  
  /* Adjust topbar for mobile */
  header#topbar{ padding:0 8px; }
  .infoBarRight .infoBarWidget{ min-height:auto; }
  .weatherWidget{ 
    display:grid !important;
    grid-template-columns: auto auto 1fr;
    gap:8px;
    padding:6px 10px !important;
    align-items:center;
  }
  .weatherWidgetIcon{ font-size:44px; grid-column:1; grid-row:1 / span 2; }
  .weatherWidgetContent{
    display:flex !important;
    flex-direction:column !important;
    gap:2px;
    grid-column:2;
    grid-row:1 / span 2;
  }
  .weatherWidget .weatherWidgetTemp{ font-size:20px; line-height:1.1; }
  .weatherWidgetDesc{ font-size:12px; }
  .weatherWidgetLocation{ font-size:10px; display:block !important; grid-column:3; grid-row:1; align-self:start; justify-self:end; }
  .weatherWidgetDetails{ 
    display:flex !important;
    flex-direction:column !important;
    gap:3px;
    align-items:flex-end;
    grid-column:3;
    grid-row:2;
  }
  .weatherDetail{ padding:2px 6px; font-size:10px; }
  .weatherDetailLabel{ font-size:8px; }
  .weatherDetailValue{ font-size:10px; }
  .humiditySection{ display:flex !important; }
  .timeWidget{ padding:5px 8px !important; }
  .timeWidget .timeWidgetTime{ font-size:16px; }
  .timeWidget .timeWidgetDate{ font-size:10px; }
  .timeWidget .timeWidgetCity{ font-size:10px; }
  .searchBar{ font-size:14px !important; height:36px !important; padding:8px 12px !important; }
  .hn-search .ddgLogo{ width:28px; height:28px; font-size:14px; }
}

.weatherWidget:hover,
.weatherWidget:focus{
  background:rgba(255,255,255,.12) !important;
  border-color:rgba(255,255,255,.25) !important;
  transform:translateY(-2px);
  box-shadow:0 8px 16px rgba(0,0,0,.2);
  outline:none;
}
.weatherWidget:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

.weatherWidgetLeft{
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:4px;
  flex-shrink:0;
  padding-top:2px;
}

.weatherWidgetIcon{
  font-size:36px;
  line-height:1;
  flex-shrink:0;
}

.weatherWidget .weatherWidgetTemp{
  font-size:24px;
  font-weight:700;
  line-height:1;
  letter-spacing:-0.5px;
}

.weatherWidgetContent{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
  flex-shrink:0;
  justify-content:center;
  position:relative;
  z-index:1;
}

.weatherWidgetDesc{
  font-size:14px;
  color:var(--text);
  font-weight:700;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.weatherWidgetLocation{
  font-size:11px;
  color:var(--muted);
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.weatherWidgetDetails{
  display:flex;
  gap:12px;
  font-size:12px;
  flex-wrap:wrap;
}

.weatherDetail{
  display:flex;
  align-items:center;
  gap:4px;
  background:rgba(255,255,255,.06);
  padding:3px 8px;
  border-radius:6px;
  white-space:nowrap;
}

.weatherDetailLabel{
  color:var(--muted);
  font-weight:600;
  font-size:11px;
}

.weatherDetailValue{
  color:var(--text);
  font-weight:700;
  display:flex;
  align-items:center;
  gap:2px;
  font-size:13px;
}

.windArrow{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:14px;
  height:14px;
  transition:transform 0.6s cubic-bezier(0.2, 0.6, 0.8, 0.4);
  font-size:11px;
  font-weight:700;
  transform-origin:center;
  color:rgba(255,255,255,.8);
}

.humiditySection{
  display:flex;
  flex-direction:column;
  align-items:flex-start;
  gap:3px;
}

.humidityBar{
  width:32px;
  height:4px;
  background:rgba(255,255,255,.1);
  border-radius:3px;
  overflow:hidden;
}

.humidityFill{
  height:100%;
  background:linear-gradient(90deg, rgba(59,130,246,.6), rgba(34,197,94,.6));
  transition:width 0.3s ease;
}

.timeWidget{
  flex:0 0 auto;
  flex-direction:column;

  align-items:flex-start;
  gap:4px;
  padding:8px 14px;
}
.timeWidgetTime{
  font-size:20px;
  font-weight:700;
  font-variant-numeric:tabular-nums;
  line-height:1.2;
  white-space:nowrap;
}
.timeWidgetDate{
  font-size:12px;
  color:var(--muted);
  font-weight:600;
  white-space:nowrap;
}
.timeWidgetSelect{
  margin-top:4px;
  font-size:11px;
  padding:4px 8px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:8px;
  cursor:pointer;
  font-weight:600;
  outline:none;
  transition:all 0.2s ease;
}
.timeWidgetSelect:hover,
.timeWidgetSelect:focus{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.25);
}
.timeWidgetSelect:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

.statsWidget{
  flex:1 1 auto;
  flex-direction:column;
  align-items:flex-start;
  gap:4px;
  min-width:120px;
}
.statsWidgetLabel{
  font-size:11px;
  color:var(--muted);
  font-weight:600;
  text-transform:uppercase;
  letter-spacing:0.5px;
}
.statsWidgetValue{
  font-size:14px;
  font-weight:600;
  color:var(--text);
  line-height:1.3;
}

@media (max-width:720px){
  .brand{
    min-width:auto;
  }
  .navCenter{
    min-width:100%;
    order:5;
  }
  .searchBar{
    max-width:100%;
  }
  .btnMain{
    padding:10px 18px;
    font-size:13px;
  }
  .topRight{
    order:3;
    flex-wrap:wrap;
    justify-content:center;
    gap:16px;
    min-width:100%;
  }
  .topWeather{
    gap:6px;
  }
  .weatherIcon{
    font-size:24px;
  }
  .weatherTemp{
    font-size:14px;
  }
  .topClock{
    padding:6px 10px;
  }
  .topClockDate{
    font-size:14px;
  }
  .topClockTime{
    font-size:18px;
  }
  .topbarInner{
    padding:12px 16px;
  }
  .infoBar{
    flex-direction:column;
    align-items:stretch;
  }
  .infoBarWidget{
    width:100%;
    justify-content:space-between;
  }
  .timeWidget{
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
  }
  .timeWidgetSelect{
    margin-top:0;
    margin-left:auto;
  }
}

.grid{
  display:grid;
  grid-template-columns:repeat(12, 1fr);
  gap:var(--gap);
}
.newsCard{
  grid-column:span 4;
}
@media (max-width:1200px){ 
  .grid{grid-template-columns:repeat(6, 1fr);}
  .newsCard{grid-column:span 3;}
}
@media (max-width:720px){ 
  .grid{grid-template-columns:repeat(1, 1fr);}
  .newsCard{grid-column:span 1;}
}

.grid2{
  display:grid;
  grid-template-columns:repeat(2, 1fr);
  gap:var(--gap);
}
@media (max-width:980px){ .grid2{grid-template-columns:1fr;} }

.card{
  border:1px solid var(--border);
  background:var(--panel);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
  overflow:hidden;
  transition:all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position:relative;
}
.card::before{
  content:"";
  position:absolute;
  top:0;
  left:0;
  right:0;
  height:3px;
  background:linear-gradient(90deg, var(--accent), var(--accentHover));
  opacity:0;
  transition:opacity 0.3s ease;
}
.card:hover{
  transform:translateY(-2px);
  box-shadow:var(--shadowHover);
  border-color:rgba(255,255,255,.20);
}
.card:hover::before{opacity:1}
.cardHead{
  padding:var(--padCard);
  border-bottom:1px solid var(--border);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  background:rgba(255,255,255,.02);
}
.cardHeadLeft{
  display:flex;
  align-items:center;
  gap:12px;
  min-width:0;
  flex:1;
}
.faviconContainer{
  width:28px;
  height:28px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  display:grid;
  place-items:center;
  overflow:hidden;
  flex-shrink:0;
}
.favicon{
  width:18px;
  height:18px;
  object-fit:contain;
}
.cardHeadTitle{
  min-width:0;
  flex:1;
}
.cardHeadName{
  font-weight:700;
  font-size:14px;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  line-height:1.3;
}
.cardHeadSite{
  font-size:12px;
  color:var(--muted);
  font-weight:500;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
  margin-top:2px;
  line-height:1.3;
}
.cardBody{
  padding:var(--padCard);
}

.stocksNewsCard .cardHead{
  align-items:flex-start;
}

.stocksNewsCard .cardHead h2{
  line-height:1.1;
  padding-top:2px;
}

.stocksNewsCard .tabsRow{
  margin-bottom:0;
  align-items:center;
}

.stocksNewsCard .cardBody{
  padding-top:12px;
}

.stocksNewsCard #stocksNewsRetryBtn{
  padding:6px 12px;
  font-size:12px;
  line-height:1.1;
  align-self:center;
}

.errorMessage{
  padding:16px;
  border-radius:12px;
  background:rgba(239,68,68,.15);
  border:1px solid rgba(239,68,68,.3);
  color:var(--text);
  font-weight:600;
  font-size:14px;
  text-align:center;
  line-height:1.5;
}
[data-theme="light"] .errorMessage{
  background:rgba(239,68,68,.1);
  border-color:rgba(239,68,68,.2);
}

.stack{display:flex;flex-direction:column;gap:10px}
.chip{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  border-radius:16px;
  padding:12px 16px;
  font-weight:600;
  font-size:14px;
  line-height:1.4;
  transition:all 0.2s ease;
}
.chip:hover{
  background:rgba(255,255,255,.10);
  border-color:rgba(255,255,255,.25);
  transform:translateX(2px);
}
.chip small{
  display:block;
  margin-top:6px;
  font-size:12px;
  color:var(--muted);
  font-weight:500;
  line-height:1.5;
}

.modStamp{
  margin-left:auto;
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  opacity:.9;
  white-space:nowrap;
}
.modStamp b{ color:var(--text); }
.modStamp .stale{ opacity:.75; }

.rssList{
  display:flex;
  flex-direction:column;
  gap:10px;
}
.rssItem{
  display:block;
  padding:var(--padItem) 14px;
  border-radius:16px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  text-decoration:none;
  font-weight:600;
  font-size:var(--fontItem);
  line-height:var(--lineItem);
  transition:all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  position:relative;
  overflow:hidden;
  outline:none;
}
.rssItem:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.rssItem::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:3px;
  background:var(--accent);
  transform:scaleY(0);
  transition:transform 0.2s ease;
}
.rssItem:hover,
.rssItem:focus{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.25);
  transform:translateX(4px);
  box-shadow:0 2px 8px rgba(0,0,0,.1);
}
.rssItem:hover::before,
.rssItem:focus::before{transform:scaleY(1)}
.rssItemTitle{
  font-weight:700;
  font-size: calc(14px * var(--font-multiplier, 1));
  line-height:var(--lineItem);
  margin-bottom:8px;
  margin-top:8px;
}
.rssItemDate{
  font-size: calc(11px * var(--font-multiplier, 1));
  color:var(--muted);
  font-weight:500;
  text-transform:uppercase;
  letter-spacing:0.5px;
  opacity:0.8;
}
.rssItemDesc{
  font-size: calc(13px * var(--font-multiplier, 1));
  color:var(--text);
  font-weight:400;
  line-height:1.5;
  opacity:0.85;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  margin-top:8px;
}
.rssMeta{
  font-size:12px;
  color:var(--muted);
  font-weight:500;
  margin-top:6px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
  line-height:1.4;
}

.skeleton{
  border:1px solid var(--border);
  background:linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.08), rgba(255,255,255,.04));
  background-size:200% 100%;
  animation:sk 1.5s ease-in-out infinite;
  border-radius:16px;
  height:48px;
}
@keyframes sk{0%{background-position:200% 0}100%{background-position:-200% 0}}

.select, .input, .textarea{
  width:100%;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:14px;
  padding:12px 16px;
  font-weight:500;
  font-size:14px;
  outline:none;
  transition:all 0.2s ease;
}
.select:focus, .input:focus, .textarea:focus{
  border-color:var(--accent);
  background:rgba(255,255,255,.10);
  box-shadow:0 0 0 3px rgba(139,92,246,.1);
}
.textarea{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-weight:600;resize:vertical}
.label{color:var(--muted);font-size:13px;font-weight:600;margin-bottom:4px}
.formRow{display:grid;gap:10px;margin-bottom:16px}
.divider{height:1px;background:rgba(255,255,255,.10);margin:20px 0;border:none}

.editorRow{
  display:grid;
  grid-template-columns: 1.2fr 2.4fr 1.6fr 0.7fr auto;
  gap:12px;
  align-items:center;
  padding:12px;
  border-radius:12px;
  transition:background 0.2s ease;
}
.editorRow:hover{
  background:rgba(255,255,255,.04);
}
@media (max-width:980px){
  .editorRow{grid-template-columns:1fr; gap:10px;}
}

.iconBtn{
  width:38px;
  height:38px;
  border-radius:12px;
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  cursor:pointer;
  font-weight:700;
  font-size:16px;
  display:flex;
  align-items:center;
  justify-content:center;
  transition:all 0.2s ease;
  outline:none;
}
.iconBtn:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.iconBtn:hover,
.iconBtn:focus{
  background:rgba(255,255,255,.12);
  border-color:rgba(255,255,255,.25);
  transform:scale(1.05) rotate(5deg);
}
.iconBtn:active{transform:scale(0.98)}

.tabsRow{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.tabPill{
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  color:var(--text);
  border-radius:999px;
  padding:8px 14px;
  cursor:pointer;
  font-weight:600;
  font-size:12px;
  transition:all 0.2s ease;
  outline:none;
}
.tabPill:focus{
  outline:2px solid var(--accent);
  outline-offset:2px;
}
.tabPill:hover,
.tabPill:focus{
  background:rgba(255,255,255,.10);
  transform:translateY(-1px);
}
.tabPill.active{
  background:linear-gradient(135deg, rgba(139,92,246,.25), rgba(139,92,246,.15));
  border-color:rgba(139,92,246,.40);
  color:var(--accentHover);
  font-weight:700;
  box-shadow:0 2px 8px rgba(139,92,246,.2);
}

.weatherGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:var(--gap);
  align-items:start;
}
@media (max-width:980px){ .weatherGrid{grid-template-columns:1fr;} }



/* --- Weather Page New Layout --- */

/* Restore previous weatherGrid and card layout */
.weatherGrid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:var(--gap);
  align-items:start;
}
@media (max-width:980px){ .weatherGrid{grid-template-columns:1fr;} }


.weatherCurrent{
  grid-row: span 2;
}
@media (max-width:980px){ .weatherCurrent{grid-row:auto;} }

/* Current Conditions Widget Styles */
.current-top-grid{
  display:flex;
  justify-content:space-between;
  gap:16px;
  align-items:stretch;
}

.weather-icon-temp{
  display:flex;
  align-items:center;
  gap:16px;
  min-width:0;
  flex:1 1 auto;
}

.current-location{
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-end;
  flex:0 1 auto;
  min-height:100%;
}

.currentMainIcon{ font-size:54px; }
.currentSummaryText{ font-size:14px; }
.currentTempValue{ font-size:32px; }
.currentRangeText{ font-size:13px; }
.currentUpdatedText{ font-size:10px; }

#currentLocationText{
  display:flex;
  align-items:center;
  justify-content:center;
  min-height:56px;
  font-size:22px;
  white-space:nowrap;
}

.currentLocationHint{
  font-size:11px;
  font-weight:600;
  color:var(--muted);
  text-align:center;
  opacity:0.9;
  line-height:1.2;
}

.current-stats-unified{
  display:grid;
  grid-template-columns: repeat(4, 1fr);
  gap:12px 16px;
  align-items:center;
}

/* Desktop order: FEELS LIKE, WIND, HUMIDITY, PRECIP / SUNRISE, SUNSET, DAYLIGHT, MOON */
.current-stats-unified > div:nth-child(1) { order: 1; } /* FEELS LIKE */
.current-stats-unified > div:nth-child(2) { order: 3; } /* HUMIDITY */
.current-stats-unified > div:nth-child(3) { order: 2; } /* WIND */
.current-stats-unified > div:nth-child(4) { order: 4; } /* PRECIP */
.current-stats-unified > div:nth-child(5) { order: 5; } /* SUNRISE */
.current-stats-unified > div:nth-child(6) { order: 7; } /* DAYLIGHT */
.current-stats-unified > div:nth-child(7) { order: 6; } /* SUNSET */
.current-stats-unified > div:nth-child(8) { order: 8; } /* MOON */

/* Mobile responsive layout for Current Conditions */
@media (max-width:760px){
  .current-top-grid{
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    gap:10px;
  }
  
  .weather-icon-temp{
    display:flex;
    align-items:center;
    justify-content:flex-start;
    gap:10px;
    flex:1 1 auto;
    min-width:0;
  }

  .currentIconBlock{ gap:4px !important; }
  .currentMainIcon{ font-size:40px; }
  .currentSummaryText{ font-size:12px; }
  .currentTempValue{ font-size:26px; }
  .currentRangeText{ font-size:12px; }
  
  .current-location{
    width:auto;
    display:flex;
    flex-direction:column;
    align-items:flex-end;
    justify-content:center;
    gap:4px;
    flex:0 1 auto;
  }
  
  #currentLocationText{
    min-height:42px;
    font-size:15px !important;
    padding:7px 10px !important;
    max-width:170px;
    white-space:normal;
    line-height:1.15;
  }

  .currentLocationHint{
    font-size:10px;
  }

  .currentUpdatedText{ font-size:9px; }
  
  .current-stats-unified{
    grid-template-columns: repeat(2, 1fr);
    gap:10px 12px;
  }
  
  /* Reset order in mobile to follow HTML order */
  .current-stats-unified > div { order: initial; }
}

#weatherNews{
  min-height: 200px;
}

.alertIndicator{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #f87171;
  animation: pulse 2s infinite;
  margin-left: auto;
}

@keyframes pulse{
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

.weatherAside{position:sticky; top:86px;}
@media (max-width:980px){ .weatherAside{position:static;} }

.windyBar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.windyFrameWrap{
  width:100%;
  height:420px;
  border-radius:16px;
  overflow:hidden;
  border:1px solid var(--border);
  box-shadow:0 4px 16px rgba(0,0,0,.2);
  transition:all 0.3s ease;
}
.windyFrameWrap:hover{
  box-shadow:0 8px 24px rgba(0,0,0,.3);
  border-color:rgba(255,255,255,.20);
}
#windyFrame{width:100%;height:100%;border:0;display:block;}
@media (max-width:980px){ .windyFrameWrap{height:320px;} }

.wxTableWrap{
  border:1px solid var(--border);
  border-radius:16px;
  overflow:auto;
  background:rgba(255,255,255,.05);
  max-height: 42vh;
  box-shadow:0 2px 8px rgba(0,0,0,.1);
}
.wxDailyWrap.isExpanded{
  max-height:none;
}
.wxTable{
  width:100%;
  border-collapse:collapse;
  font-size:12.5px;
  line-height:1.4;
}
.wxTable thead th{
  position:sticky;
  top:0;
  z-index:1;
  background:rgba(0,0,0,.25);
  backdrop-filter: blur(8px);
  text-align:center;
  padding:10px 12px;
  border-bottom:1px solid var(--border);
  white-space:nowrap;
  font-weight:700;
  font-size:11px;
  text-transform:uppercase;
  letter-spacing:0.5px;
  color:var(--muted);
}
.wxTable thead th + th{
  border-left:1px solid rgba(255,255,255,.12);
}
.wxTable td{
  padding:9px 12px;
  border-bottom:1px solid rgba(255,255,255,.12);
  vertical-align:middle;
  transition:background 0.2s ease;
  text-align:center;
}
.wxTable td + td{
  border-left:1px solid rgba(255,255,255,.10);
}
.wxTable td.wxT{
  text-align:left;
}
.wxTable th.wxDateCol,
.wxTable td.wxDateCol{
  text-align:center;
}
.wxTable tbody tr:hover{ background:rgba(255,255,255,.10); }
.wxTable tbody tr:nth-child(2n){ background:rgba(255,255,255,.05); }
.wxT{ white-space:nowrap; font-weight:600; }
.wxIconCol,
.wxI{
  width:48px;
  min-width:48px;
  max-width:48px;
  padding-left:6px !important;
  padding-right:6px !important;
  text-align:center;
}
.wxIcon{
  display:inline-block;
  font-size:17px;
  line-height:1;
}
.wxC{ max-width:520px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.wxN{ font-variant-numeric: tabular-nums; font-weight:600; }
.wxG{ color:var(--muted); font-weight:500; }
.wxGust{ color:#60a5fa; font-weight:500; font-size:11px; }
@media (max-width:980px){
  .wxTableWrap{ max-height:none; }
  .wxC{ max-width:240px; }
}

@media (max-width:760px){
  .wxTable{
    font-size:12px;
  }

  .wxIcon{
    font-size:15px;
  }
  
  .wxTable thead th,
  .wxTable td{
    padding:8px 10px;
  }
  
  /* Hide Wind column on mobile for both hourly and daily */
  .hourlyWind,
  .dailyWind,
  .wxTable th.hourlyWind,
  .wxTable th.dailyWind{
    display:none !important;
  }

  .wxTable th.hourlyHumidity,
  .wxTable td.hourlyHumidity,
  .wxTable th.dailyPrecip,
  .wxTable td.dailyPrecip{
    display:none !important;
  }
}

@media (max-width:720px){
  .weatherWidget{
    max-width:100%;
    flex-wrap:wrap;
  }
  
  .weatherWidgetLeft{
    flex-direction:row;
    gap:8px;
  }
  
  .weatherWidgetIcon{
    font-size:36px;
  }
  
  .weatherWidget .weatherWidgetTemp{
    font-size:18px;
  }
  
  .weatherWidgetContent{
    flex-basis:100%;
    gap:4px;
  }
  
  .weatherWidgetDetails{
    gap:8px;
    font-size:11px;
  }
  
  .weatherDetail{
    padding:2px 6px;
    font-size:10px;
  }
}


/* ===== STOCKS PAGE STYLES ===== */

/* Market Indices Bar */
.marketIndices{
  --ticker-distance:1200px;
  --ticker-duration:160s;
  display:block;
  padding:16px 20px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:var(--radius);
  margin-bottom:24px;
  overflow:hidden;
  scrollbar-width:thin;
  width:100%;
}

.marketTickerViewport{
  overflow:hidden;
  width:100%;
  cursor:grab;
  -webkit-user-select:none;
  user-select:none;
  touch-action:pan-y;
}

.marketTickerTrack{
  display:flex;
  align-items:stretch;
  gap:12px;
  width:max-content;
  will-change:transform;
}

.marketTickerViewport.isDragging{
  cursor:grabbing;
}

.marketTickerGroup{
  display:flex;
  align-items:stretch;
  gap:12px;
}

.indexItem{
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:4px;
  min-width:200px;
  max-width:240px;
  padding:10px 12px;
  border:1px solid var(--border);
  border-radius:12px;
  background:rgba(255,255,255,.03);
}

.indexTopRow{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
}

.indexName{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  text-transform:uppercase;
  letter-spacing:0.5px;
}

.indexSession{
  font-size:10px;
  font-weight:800;
  padding:2px 7px;
  border-radius:999px;
  letter-spacing:0.3px;
  border:1px solid transparent;
}

.indexSession.open{
  color:#22c55e;
  border-color:rgba(34,197,94,.4);
  background:rgba(34,197,94,.15);
}

.indexSession.premarket,
.indexSession.afterhours,
.indexSession.paused{
  color:#facc15;
  border-color:rgba(250,204,21,.4);
  background:rgba(250,204,21,.16);
}

.indexSession.closed{
  color:#f87171;
  border-color:rgba(248,113,113,.4);
  background:rgba(248,113,113,.14);
}

@media (max-width:980px){
  .marketIndices{
    padding:12px 14px;
  }

  .indexItem{
    min-width:170px;
    max-width:210px;
    padding:9px 10px;
  }
}

@media (prefers-reduced-motion: reduce){
  .marketTickerViewport{
    scroll-behavior:auto;
  }
}

.indexValue{
  font-size:18px;
  font-weight:800;
  letter-spacing:-0.5px;
}

.indexChange{
  font-size:13px;
  font-weight:700;
  display:flex;
  align-items:center;
  gap:4px;
}

.indexChange.positive{
  color:#10b981;
}

.indexChange.negative{
  color:#ef4444;
}

.dataSourceTag{
  display:inline-flex;
  align-items:center;
  margin-left:8px;
  padding:2px 8px;
  border-radius:999px;
  font-size:10px;
  font-weight:700;
  letter-spacing:0.2px;
  color:var(--muted);
  border:1px solid var(--border);
  background:rgba(255,255,255,.06);
  vertical-align:middle;
}

.dataSourceTag.isFallback{
  color:#facc15;
  border-color:rgba(250,204,21,.4);
  background:rgba(250,204,21,.15);
}

.newsFallbackNote{
  display:inline-flex;
  margin:0 0 10px;
}

.newsCooldownNote{
  color:#fde68a;
  border-color:rgba(245,158,11,.45);
  background:rgba(245,158,11,.2);
}

.newsLastSuccessNote{
  margin:-6px 0 10px;
  font-size:11px;
}

/* Tab Pills for News Toggle */
.tabsRow{
  display:flex;
  gap:6px;
  background:var(--panel);
  padding:4px;
  border-radius:10px;
  border:1px solid var(--border);
}

.tabPill{
  font-size:12px;
  font-weight:600;
  padding:6px 12px;
  border:none;
  background:transparent;
  color:var(--muted);
  border-radius:7px;
  cursor:pointer;
  transition:all 0.2s ease;
  white-space:nowrap;
}

.tabPill:hover{
  background:var(--panelHover);
  color:var(--text);
}

.tabPill.active{
  background:var(--accent);
  color:#fff;
  box-shadow:0 2px 8px rgba(139,92,246,0.3);
}

/* Enhanced Stock Item */
.stockItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:14px 16px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:12px;
  transition:all 0.2s ease;
  cursor:pointer;
  gap:12px;
}

.stockItem:hover{
  background:var(--panelHover);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,0.15);
}

.stockItemLeft{
  display:flex;
  align-items:center;
  gap:12px;
  flex:1;
  min-width:0;
}

.stockItemInfo{
  display:flex;
  flex-direction:column;
  gap:2px;
  min-width:0;
}

.stockItemSymbol{
  font-size:15px;
  font-weight:800;
  letter-spacing:-0.3px;
}

.stockItemName{
  font-size:12px;
  color:var(--muted);
  font-weight:600;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.stockItemStats{
  font-size:11px;
  color:var(--muted);
  font-weight:700;
  display:flex;
  align-items:center;
  gap:4px;
  margin-top:2px;
  opacity:0.9;
}

.statLabel{
  text-transform:uppercase;
  letter-spacing:0.3px;
}

.statLow{
  color:#ef4444;
}

.statHigh{
  color:#10b981;
}

.statSep{
  opacity:0.5;
}

.stockSparkline{
  display:flex;
  align-items:center;
  margin-left:auto;
}

.watchSparkline{
  display:flex;
  align-items:center;
  justify-content:center;
  min-width:150px;
  padding:6px 8px;
  border-radius:10px;
  background:linear-gradient(135deg, rgba(255,255,255,0.03), rgba(255,255,255,0));
  border:1px solid var(--border);
  margin-left:auto;
}

.watchSparkline.isEmpty{
  background:var(--panel2);
}

.sparklineEmpty{
  font-size:11px;
  font-weight:700;
  color:var(--muted);
  letter-spacing:0;
  text-transform:none;
  text-align:center;
  line-height:1.3;
  max-width:140px;
}

.sparkline{
  display:block;
  opacity:0.8;
}

.sparkline--watch{
  opacity:1;
  filter:drop-shadow(0 3px 8px rgba(0,0,0,0.18));
}

@media (max-width:720px){
  .watchlistItem .stockItemLeft{
    flex-wrap:wrap;
  }

  .watchSparkline{
    min-width:110px;
    padding:4px 6px;
    margin-left:0;
  }
}

.stockItemRight{
  display:flex;
  align-items:center;
  gap:12px;
}

.stockItemPrice{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
}

.stockPrice{
  font-size:16px;
  font-weight:800;
  letter-spacing:-0.4px;
}

.stockChange{
  font-size:12px;
  font-weight:700;
  padding:3px 8px;
  border-radius:6px;
  display:flex;
  align-items:center;
  gap:4px;
}

.stockChange.positive{
  background:rgba(16,185,129,0.15);
  color:#10b981;
}

.stockChange.negative{
  background:rgba(239,68,68,0.15);
  color:#ef4444;
}

.stockChange.neutral{
  background:var(--panel2);
  color:var(--muted);
}

/* Pin Button */
.pinBtn{
  width:32px;
  height:32px;
  border-radius:8px;
  border:1px solid var(--border);
  background:var(--panel);
  color:var(--muted);
  cursor:pointer;
  transition:all 0.2s ease;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:16px;
}

.pinBtn:hover{
  background:var(--panelHover);
  border-color:var(--accent);
  color:var(--accent);
}

.pinBtn.pinned{
  background:linear-gradient(135deg, rgba(139,92,246,0.25), rgba(124,58,237,0.20));
  color:#a78bfa;
  border-color:rgba(139,92,246,0.5);
}

/* News Article Item */
.newsArticle{
  display:flex;
  gap:12px;
  padding:12px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  transition:all 0.2s ease;
  cursor:pointer;
}

.newsArticle:hover{
  background:var(--panelHover);
  transform:translateY(-1px);
}

.newsThumbnail{
  width:80px;
  height:80px;
  border-radius:8px;
  object-fit:cover;
  background:var(--panel2);
  flex-shrink:0;
}

.newsContent{
  flex:1;
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:6px;
}

.newsTitle{
  font-size:14px;
  font-weight:700;
  line-height:1.3;
  display:-webkit-box;
  -webkit-line-clamp:2;
  line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}

.newsMeta{
  display:flex;
  align-items:center;
  gap:8px;
  font-size:11px;
  color:var(--muted);
  font-weight:600;
}

.newsSource{
  display:flex;
  align-items:center;
  gap:6px;
}

.sourceFavicon{
  width:14px;
  height:14px;
  border-radius:3px;
}

.newsTime{
  opacity:0.8;
}

/* Last Updated Timestamp */
.lastUpdated{
  font-size:11px;
  color:var(--muted);
  font-weight:600;
  white-space:nowrap;
}

/* Mover Item (Gainers/Losers/Trending) */
.moverItem{
  display:flex;
  align-items:center;
  justify-content:space-between;
  padding:10px 12px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  transition:all 0.2s ease;
}

.moverItem:hover{
  background:var(--panelHover);
  transform:translateX(2px);
}

.moverLeft{
  display:flex;
  flex-direction:column;
  gap:2px;
}

.moverSymbol{
  font-size:14px;
  font-weight:800;
  letter-spacing:-0.3px;
}

.moverName{
  font-size:11px;
  color:var(--muted);
  font-weight:600;
}

.moverRight{
  display:flex;
  flex-direction:column;
  align-items:flex-end;
  gap:2px;
}

.moverPrice{
  font-size:13px;
  font-weight:700;
}

.moverChange{
  font-size:11px;
  font-weight:700;
}

.moverChange.positive{
  color:#10b981;
}

.moverChange.negative{
  color:#ef4444;
}

/* Economic Calendar Event */
.calendarEvent{
  display:flex;
  gap:12px;
  padding:12px;
  background:var(--panel);
  border:1px solid var(--border);
  border-radius:10px;
  border-left:3px solid var(--accent);
  cursor:pointer;
  transition:all 0.2s ease;
}

.calendarEvent:hover{
  background:var(--hover);
  border-color:var(--accent);
  transform:translateY(-1px);
  box-shadow:0 4px 12px rgba(0,0,0,0.1);
}

.eventTime{
  font-size:12px;
  font-weight:700;
  color:var(--muted);
  min-width:60px;
}

.eventDetails{
  flex:1;
  display:flex;
  flex-direction:column;
  gap:4px;
}

.eventTitle{
  font-size:13px;
  font-weight:700;
}

.eventSummary{
  font-size:12px;
  color:var(--muted);
  line-height:1.5;
  margin-top:4px;
}

.eventCountry{
  font-size:11px;
  color:var(--muted);
  font-weight:600;
}

.eventImpact{
  font-size:10px;
  font-weight:700;
  padding:2px 6px;
  border-radius:4px;
  width:fit-content;
  text-transform:uppercase;
  letter-spacing:0.3px;
}

.eventImpact.high{
  background:rgba(239,68,68,0.2);
  color:#ef4444;
}

.eventImpact.medium{
  background:rgba(251,191,36,0.2);
  color:#fbbf24;
}

.eventImpact.low{
  background:var(--panel2);
  color:var(--muted);
}

/* Match News widget height to Watchlist and make scrollable */
#stocksNews {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
}

#stocksBody {
  max-height: 600px;
  overflow-y: auto;
  overflow-x: hidden;
}
/* Modal Styles */
.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.modalContent {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  max-width: 500px;
  width: 90%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: var(--shadow);
  color: var(--text);
}

.modalHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--padCard);
  border-bottom: 1px solid var(--border);
}

.modalHeader h3 {
  margin: 0;
  font-size: 18px;
}

.modalHead {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
}

.modalClose {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 28px;
  line-height: 1;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.modalClose:hover {
  color: var(--text);
  transform: scale(1.1);
}

.btn-close {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 24px;
  cursor: pointer;
  padding: 0;
  width: 32px;
  height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn-close:hover {
  color: var(--text);
}

.modalBody {
  padding: var(--padCard);
}

.install-step {
  transition: all 0.2s ease;
}

.install-step:hover {
  background: var(--panel2) !important;
  border-color: var(--accent) !important;
  transform: translateX(4px);
}

.legendSection {
  margin-bottom: 20px;
}

.legendSection h4 {
  margin: 0 0 12px 0;
  font-size: 14px;
  color: var(--muted);
  text-transform: uppercase;
  font-weight: 600;
  letter-spacing: 0.5px;
}

.legendItem {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
  font-size: 13px;
  line-height: 1.4;
}

.legendColor {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  flex-shrink: 0;
}

.legendLabel {
  color: var(--text);
}

.legendMap {
  font-size: 12px;
  color: var(--muted);
  padding-top: 12px;
  border-top: 1px solid var(--border);
  margin-top: 16px;
}

/* Settings Enhancements */
.settingsTabs {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 6px;
  background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
  overflow-x: auto;
  scrollbar-width: thin;
}

.settingsTab {
  padding: 9px 13px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  font-size: 13px;
  font-weight: 700;
  border-radius: 8px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.settingsTab:hover {
  color: var(--text);
  background: rgba(255,255,255,0.06);
}

.settingsTab.active {
  color: var(--text);
  border-color: rgba(255,255,255,0.16);
  background: linear-gradient(135deg, rgba(139,92,246,0.25), rgba(59,130,246,0.22));
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.settingsTabContent {
  display: none;
}

.settingsTabContent.active {
  display: block;
}

.settingsPanelLead {
  margin-bottom: 12px;
  padding: 11px 14px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: linear-gradient(135deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
}

.collapsibleSection {
  border: 1px solid var(--border);
  border-radius: 6px;
  margin-bottom: 10px;
  overflow: hidden;
}

.collapsibleHeader {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 14px;
  background: var(--panel);
  cursor: pointer;
  user-select: none;
  border: none;
  width: 100%;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  transition: background 0.2s ease;
}

.collapsibleHeader:hover {
  background: var(--panel2);
}

.collapsibleHeader::after {
  content: "►";
  margin-left: 8px;
  transition: transform 0.2s ease;
  font-size: 11px;
}

.collapsibleHeader.expanded::after {
  transform: rotate(90deg);
}

.collapsibleBody {
  display: none;
  padding: 12px 14px;
  border-top: 1px solid var(--border);
  background: var(--panel);
}

.collapsibleBody.expanded {
  display: block;
}

.toggleSwitch {
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggleInput {
  appearance: none;
  width: 44px;
  height: 24px;
  background: var(--panel2);
  border-radius: 12px;
  cursor: pointer;
  border: 1px solid var(--border);
  transition: all 0.3s ease;
  position: relative;
}

.toggleInput::after {
  content: "";
  position: absolute;
  left: 2px;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: var(--text);
  border-radius: 50%;
  transition: left 0.3s ease;
}

.toggleInput:checked {
  background: var(--accent);
  border-color: var(--accent);
}

.toggleInput:checked::after {
  left: 22px;
}

.buttonGroup {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.buttonGroupItem {
  padding: 6px 12px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.buttonGroupItem:hover {
  background: var(--panel2);
}

.buttonGroupItem.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #000;
}

.checkboxGrid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.checkboxLabel {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 500;
  transition: all 0.2s ease;
  user-select: none;
}

.checkboxLabel:hover {
  background: var(--panel2);
  border-color: var(--accent);
}

.checkboxLabel input[type="checkbox"] {
  cursor: pointer;
  width: 16px;
  height: 16px;
  margin: 0;
}

.checkboxLabel span {
  flex: 1;
}

.marketIndicesList {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  align-items: stretch;
  gap: 10px;
  width: 100%;
}

.marketIndexRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px;
  min-width: 0;
  min-height: 48px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--panel);
  box-shadow: 0 1px 0 rgba(255,255,255,.03) inset;
  transition: border-color 0.2s ease, background 0.2s ease, transform 0.2s ease;
}

.marketIndexRow:hover {
  background: var(--panel2);
  border-color: color-mix(in srgb, var(--accent) 35%, var(--border));
  transform: translateY(-1px);
}

.marketIndexRow.drag-over {
  border-color: var(--accent);
  background: rgba(139,92,246,.12);
}

.marketIndexRow.dragging {
  opacity: 0.7;
}

.marketIndexToggle {
  flex: 1;
}

.marketIndicesSelector {
  display: grid;
  justify-items: stretch;
  gap: 10px;
  width: 100%;
  margin: 0;
}

.marketIndicesSelector .buttonGroup {
  justify-content: flex-start;
  gap: 8px;
  margin-bottom: 0;
}

.marketIndicesSelector .buttonGroupItem {
  min-width: 104px;
  text-align: center;
}

.marketIndicesControls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.marketIndicesSort {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.marketIndicesSortLabel {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.marketIndicesSortCurrent {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  margin-top: -2px;
}

.marketIndexText {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.marketIndexName {
  font-size: 12px;
  font-weight: 700;
  line-height: 1.2;
}

.marketIndexMeta {
  font-size: 11px;
  color: var(--muted);
  font-weight: 600;
  line-height: 1.15;
}

.settingRow.marketStripSettingRow {
  display: grid;
  grid-template-columns: 1fr;
  align-items: start;
  gap: 16px;
}

@media (max-width: 980px) {
  .settingRow.marketStripSettingRow {
    grid-template-columns: 1fr;
  }

  .marketIndicesSelector {
    width: 100%;
    margin-left: 0;
  }

  .marketIndexRow {
    min-width: 0;
    min-height: 44px;
  }

  .marketIndicesList {
    grid-template-columns: 1fr;
  }
}

.marketIndexRowActions {
  display: flex;
  align-items: center;
  gap: 6px;
}

.marketMoveBtn {
  width: 32px;
  height: 32px;
  border-radius: 10px;
  font-size: 14px;
}

.marketDragHandle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  color: var(--muted);
  font-weight: 800;
  letter-spacing: 1px;
  cursor: grab;
  user-select: none;
}

.sliderContainer {
  display: flex;
  align-items: center;
  gap: 12px;
}

.sliderInput {
  flex: 1;
  height: 6px;
  border-radius: 3px;
  background: var(--panel2);
  outline: none;
  -webkit-appearance: none;
  appearance: none;
}

.sliderInput::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  transition: all 0.2s ease;
}

.sliderInput::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  transition: all 0.2s ease;
}

.sliderLabel {
  font-size: 12px;
  color: var(--muted);
  min-width: 30px;
  text-align: right;
}

.settingRowGroup {
  display: grid;
  gap: 8px;
}

.settingRow {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 0;
  border-bottom: 1px solid var(--border);
}

.settingRow:last-child {
  border-bottom: none;
}

.settingLabel {
  font-size: 13px;
  color: var(--text);
  font-weight: 500;
}

.settingHint {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}

.presetButtons {
  display: flex;
  gap: 6px;
  margin-bottom: 12px;
  flex-wrap: wrap;
}

.presetBtn {
  padding: 6px 11px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  border-radius: 5px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.presetBtn:hover {
  background: var(--panel2);
}

.resetButton {
  margin-top: 12px;
  padding: 8px 14px;
  border: 1px solid rgba(239, 68, 68, 0.3);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  border-radius: 5px;
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  transition: all 0.2s ease;
}

.resetButton:hover {
  background: rgba(239, 68, 68, 0.2);
}

.statusIndicator {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  padding: 4px 8px;
  border-radius: 4px;
  background: var(--panel);
  color: var(--muted);
}

.statusIndicator.saved {
  color: #10b981;
  background: rgba(16, 185, 129, 0.1);
}

.statusIndicator.unsaved {
  color: #f59e0b;
  background: rgba(245, 158, 11, 0.1);
}

.statusIndicator.error {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.1);
}

/* Settings page specific styles */
#zipInput {
  text-align: right !important;
}
