/* TekWire uses site theme; adds layout for wire grid */

html, body{ height:100% }
html {
  background: linear-gradient(135deg, #5981B1, #365475);
  background-attachment: fixed;
}
body{ 
  display:flex; 
  min-height:100vh; 
  flex-direction:column;
  background: linear-gradient(135deg, #5981B1, #365475) !important;
  background-image: none !important;
  background-attachment: fixed;
  color: #fff !important;
}
main{ flex:1 0 auto; padding-bottom: 80px; }
footer{ 
  margin-top:auto;
  background: rgba(14,22,35, 0.95);
  border-top: 1px solid rgba(152,186,227, 0.12);
  padding: 24px 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
}
.foot{ 
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

.wire-grid{ display:block }

.news-col{ display:flex; flex-direction:column; gap:10px }
/* Smooth single background behind Updated time and list */
.news-col{ background: transparent }
.wrap .wire-grid, .wrap .news-col{ background: transparent }
/* remove legacy padding for Updated (now in hero) */
.muted#articlesUpdated{ padding-left:0; padding-right:0 }

/* MSN-style responsive grid layout */
.news{ 
  display:grid; 
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
  gap:20px; 
  grid-auto-flow: row; /* Changed from 'row dense' to prevent side-by-side 2-column items */
  max-width: 1400px;
  margin: 0 auto;
  padding: 0 20px;
}
.news > *{ min-width: 0; position:relative; z-index:0; isolation:isolate }
.news-actions{ display:flex; justify-content:center; margin-top: 30px; }

/* Load More button - blue gradient styling */
.news-actions .btn.primary,
.news-actions .btn {
  background: linear-gradient(135deg, var(--zms-300), var(--zms-500));
  color: #fff;
  border-color: rgba(152,186,227, 0.35);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(89,129,177, 0.25);
}

.news-actions .btn.primary:hover,
.news-actions .btn:hover {
  background: linear-gradient(135deg, var(--zms-100), var(--zms-300));
  box-shadow: 0 12px 35px rgba(89,129,177, 0.4);
  border-color: rgba(152,186,227, 0.5);
  transform: translateY(-2px) scale(1);
}

/* MSN-style responsive breakpoints */
@media (min-width: 1200px){ 
  .news{ grid-template-columns: repeat(4, 1fr); }
  .card.article.featured{ grid-column: span 2; grid-row: span 1; max-width: 100%; }
  .card.article{ max-width: 100%; }
}
@media (min-width: 900px) and (max-width: 1199px){ 
  .news{ grid-template-columns: repeat(3, 1fr); }
  .card.article.featured{ grid-column: span 2; grid-row: span 1; max-width: 100%; }
  .card.article{ max-width: 100%; }
}
@media (min-width: 600px) and (max-width: 899px){ 
  .news{ grid-template-columns: repeat(2, 1fr); }
  .card.article.featured{ grid-column: span 2; grid-row: span 1; max-width: 100%; }
  .card.article{ max-width: 100%; }
}
@media (max-width: 599px){ 
  .news{ grid-template-columns: 1fr; padding: 0 10px; }
  .card.article.featured{ grid-column: span 1; grid-row: span 1; }
}

.card.article{ 
  display:flex; 
  flex-direction:column; 
  overflow:hidden; 
  isolation:isolate; 
  contain: layout paint; 
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  background: linear-gradient(180deg, rgba(15,25,40, 0.95), rgba(10,18,28, 0.85)) !important;
  border: 1px solid rgba(152,186,227, 0.12) !important;
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  grid-column: span 1; /* Default to 1 column */
  max-width: 100%;
}
.card.article:hover{ 
  transform: translateY(-4px); 
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
  border-color: rgba(152,186,227, 0.3) !important;
  background: linear-gradient(180deg, rgba(18,30,45, 0.95), rgba(12,20,32, 0.85)) !important;
}

/* MSN-style responsive image heights */
.card.article .thumb{ 
  width:100%; 
  height:200px; 
  object-fit:cover; 
  border-radius:12px; 
  border:1px solid rgba(152,186,227, 0.15); 
  margin-bottom:12px; 
  background: linear-gradient(135deg, #5981B1, #365475);
  transition: transform 0.2s ease;
  display: block;
}
.card.article:hover .thumb{
  transform: scale(1.02);
}
.card.article.featured .thumb{ height: 280px; }

/* Video article styling */
.card.article.video .thumb{
  position: relative;
}
.card.article.video .yt-play{
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-size: 20px;
  transition: all 0.2s ease;
}
.card.article.video:hover .yt-play{
  background: rgba(0, 0, 0, 0.9);
  transform: translate(-50%, -50%) scale(1.1);
}

/* MSN-style typography */
.card.article .top strong{ 
  font-size: 1.1rem; 
  line-height: 1.3; 
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.card.article.featured .top strong{ 
  font-size: 1.4rem; 
  line-height: 1.2;
  -webkit-line-clamp: 4;
}

.card.article .thumb.noimg{
  display:block;
  background: linear-gradient(135deg, #5981B1, #365475);
  position:relative;
  overflow:hidden;
}
.card.article .thumb.noimg::after{
  content:""; 
  position:absolute; 
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 280px;
  height: 280px;
  background: url('../../images/hatch_01.png') center/contain no-repeat;
  opacity:.15;
  z-index: 1;
}
.card.article.featured .thumb.noimg::after{
  width: 380px;
  height: 380px;
}

.card.article .src{ 
  font-size:.75rem; 
  color:var(--muted); 
  margin:0 0 6px 0; 
  text-align:left;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.card.article p.muted{ 
  display:-webkit-box; 
  -webkit-line-clamp:3; 
  -webkit-box-orient:vertical; 
  overflow:hidden;
  color: var(--muted);
  line-height: 1.4;
  margin-bottom: 12px;
}
.card.article.featured p.muted{
  -webkit-line-clamp: 4;
}
.card.article .meta{ 
  font-size:.75rem; 
  color:var(--muted); 
  margin-bottom:12px; 
  display:flex; 
  gap:8px; 
  align-items:center; 
}
.card.article .tags{ display:flex; gap:6px; flex-wrap:wrap; margin-top: 8px; }
.tag{ 
  font-size:11px; 
  padding:4px 8px; 
  border-radius:6px; 
  background:color-mix(in oklab, var(--accent) 15%, transparent); 
  color:var(--accent); 
  border:1px solid color-mix(in oklab, var(--accent) 25%, transparent);
}
.card.article .actions{ margin-top: 12px; }
.card.article .actions .btn{
  background: linear-gradient(135deg, var(--zms-300), var(--zms-500));
  color:#fff;
  border:1px solid rgba(152,186,227, 0.35);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(89,129,177, 0.2);
  transform: translateY(0) scale(1);
}
.card.article .actions .btn:hover{ 
  background: linear-gradient(135deg, var(--zms-100), var(--zms-300));
  transform: translateY(-2px) scale(1);
  box-shadow: 0 4px 16px rgba(89,129,177, 0.35);
  border-color: rgba(152,186,227, 0.5);
}

/* Varied layout pattern - prevent 2-column articles from sitting next to each other */
/* Pattern: 2-col, 1-col, 1-col, 2-col, 1-col, 1-col, 2-col, etc. */
@media (min-width: 1200px) {
  /* 4-column grid */
  .news > .card.article:nth-child(1),
  .news > .card.article:nth-child(5),
  .news > .card.article:nth-child(9),
  .news > .card.article:nth-child(13),
  .news > .card.article:nth-child(17),
  .news > .card.article:nth-child(21){ 
    grid-column: span 2; 
    max-width: 100%; 
  }
  /* Ensure single columns after 2-column items */
  .news > .card.article:nth-child(2),
  .news > .card.article:nth-child(3),
  .news > .card.article:nth-child(6),
  .news > .card.article:nth-child(7),
  .news > .card.article:nth-child(10),
  .news > .card.article:nth-child(11),
  .news > .card.article:nth-child(14),
  .news > .card.article:nth-child(15),
  .news > .card.article:nth-child(18),
  .news > .card.article:nth-child(19),
  .news > .card.article:nth-child(22),
  .news > .card.article:nth-child(23){ 
    grid-column: span 1; 
  }
  /* 4th item in pattern group (after 2-col + 2x 1-col) */
  .news > .card.article:nth-child(4),
  .news > .card.article:nth-child(8),
  .news > .card.article:nth-child(12),
  .news > .card.article:nth-child(16),
  .news > .card.article:nth-child(20),
  .news > .card.article:nth-child(24){ 
    grid-column: span 2; 
    max-width: 100%; 
  }
}

@media (min-width: 900px) and (max-width: 1199px) {
  /* 3-column grid - alternate pattern */
  .news > .card.article:nth-child(1),
  .news > .card.article:nth-child(4),
  .news > .card.article:nth-child(7),
  .news > .card.article:nth-child(10),
  .news > .card.article:nth-child(13){ 
    grid-column: span 2; 
    max-width: 100%; 
  }
}

@media (min-width: 600px) and (max-width: 899px) {
  /* 2-column grid - all items span full width when featured */
  .news > .card.article.featured{ 
    grid-column: span 2; 
    max-width: 100%; 
  }
}

@media (max-width: 1000px){
  /* On smaller screens, featured items span full width */
  .news > .card.article:nth-child(1),
  .news > .card.article:nth-child(5),
  .news > .card.article:nth-child(9),
  .news > .card.article:nth-child(13),
  .news > .card.article:nth-child(17),
  .news > .card.article:nth-child(21){ 
    grid-column: 1 / -1; 
  }
}

.news > .card.article:nth-child(3n) .thumb{ height: 200px }

/* Cluster carousel card (spans full width, always on new row) */
.card.cluster{ 
  grid-column: 1 / -1;
  grid-row: auto; 
  padding:18px; 
  position:relative; 
  contain: layout paint;
  background: linear-gradient(180deg, rgba(15,25,40, 0.95), rgba(10,18,28, 0.85));
  border: 1px solid rgba(152,186,227, 0.12);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.15);
}
.card.cluster .top{ display:flex; align-items:center; justify-content:space-between; margin-bottom:8px }
.cluster-track{
  display:grid; grid-auto-flow: column; grid-auto-columns: 100%;
  gap:12px; overflow:hidden; scroll-snap-type: x mandatory; padding-bottom:6px;
  scroll-behavior: smooth;
}
.cluster-nav{ position:absolute; inset:0; pointer-events:none; display:flex; align-items:center; justify-content:space-between }
.cluster-nav .nav-btn{ 
  pointer-events:auto; 
  border:1px solid rgba(152,186,227, 0.2);
  background: rgba(15,25,40, 0.9);
  color: var(--text); 
  border-radius:999px; 
  width:40px; 
  height:40px;
  display:flex; 
  align-items:center; 
  justify-content:center;
  margin: 0 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
  transform: translateY(0) scale(1);
}
.cluster-nav .nav-btn:hover{ 
  background: rgba(20,32,48, 0.95);
  border-color: rgba(152,186,227, 0.4);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.cluster-item{ 
  scroll-snap-align:start; 
  background: linear-gradient(180deg, rgba(18,30,45, 0.9), rgba(12,20,32, 0.8)); 
  border:1px solid rgba(152,186,227, 0.15); 
  border-radius:14px; 
  padding:12px; 
  display:flex; 
  flex-direction:column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: translateY(0) scale(1);
}
.cluster-item:hover {
  transform: translateY(-2px) scale(1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border-color: rgba(152,186,227, 0.25);
}
.cluster-item .thumb{ 
  width:100%; 
  height:120px; 
  object-fit:cover; 
  border-radius:12px; 
  border:1px solid rgba(152,186,227, 0.15); 
  margin-bottom:8px; 
  background: linear-gradient(135deg, #5981B1, #365475);
  box-shadow: 0 2px 6px rgba(0,0,0,0.15);
  display: block;
}
.cluster-item .thumb.noimg{
  background: linear-gradient(135deg, #5981B1, #365475);
  position:relative;
  overflow:hidden;
}
.cluster-item .thumb.noimg::after{
  content:""; 
  position:absolute; 
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 250px;
  height: 250px;
  background: url('../../images/hatch_01.png') center/contain no-repeat;
  opacity:.12;
}
.cluster-item .src{ font-size:.8rem; color:var(--muted); margin:2px 0 4px 0; text-align:left }
.cluster-item .title{ font-weight:700; color:var(--text); font-size:.95rem }

/* Carousel card (limited to 2 columns max, always on new row) */
.card.carousel{ 
  position:relative; 
  padding:18px; 
  grid-column: span 2;
  grid-row: auto;
}
/* First carousel limited to 2 columns */
.news > .card.carousel:first-child {
  grid-column: span 2; 
  overflow:hidden; 
  min-height: 560px; 
  contain: layout paint;
  background: linear-gradient(180deg, rgba(15,25,40, 0.95), rgba(10,18,28, 0.85));
  border: 1px solid rgba(152,186,227, 0.12);
  border-radius: 18px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.15);
}
.carousel-track{
  display:grid; grid-auto-flow: column; grid-auto-columns: 100%;
  gap:12px; overflow:hidden; scroll-snap-type: x mandatory; padding-bottom:6px;
  scroll-behavior: smooth;
}
.carousel-item{ 
  scroll-snap-align:start; 
  background: linear-gradient(180deg, rgba(18,30,45, 0.9), rgba(12,20,32, 0.8)); 
  border:1px solid rgba(152,186,227, 0.15); 
  border-radius:14px; 
  padding:12px; 
  display:flex; 
  flex-direction:column;
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  transform: translateY(0) scale(1);
}
.carousel-item:hover {
  transform: translateY(-2px) scale(1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  border-color: rgba(152,186,227, 0.25);
}
.carousel-item .thumb{ 
  width:100%; 
  height:340px; 
  object-fit:cover; 
  border-radius:12px; 
  border:1px solid rgba(152,186,227, 0.15); 
  margin-bottom:8px; 
  background: linear-gradient(135deg, #5981B1, #365475);
  box-shadow: 0 2px 8px rgba(0,0,0,0.2);
  display: block;
}
.carousel-item .thumb.noimg{
  background: linear-gradient(135deg, #5981B1, #365475);
  position:relative;
  overflow:hidden;
}
.carousel-item .thumb.noimg::after{
  content:""; 
  position:absolute; 
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 420px;
  height: 420px;
  background: url('../../images/hatch_01.png') center/contain no-repeat;
  opacity:.12;
}
.carousel-item .src{ font-size:.8rem; color:var(--muted); margin:2px 0 4px 0; text-align:left }
.carousel-item .title{ font-weight:700; color:var(--text); font-size:.95rem }
.carousel-nav{ position:absolute; inset:0; pointer-events:none; display:flex; align-items:center; justify-content:space-between }
.carousel-nav .nav-btn{ 
  pointer-events:auto; 
  border:1px solid rgba(152,186,227, 0.2);
  background: rgba(15,25,40, 0.9);
  color: var(--text); 
  border-radius:999px; 
  width:40px; 
  height:40px;
  display:flex; 
  align-items:center; 
  justify-content:center;
  margin: 0 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.25);
  transition: all 0.2s ease;
  transform: translateY(0) scale(1);
}
.carousel-nav .nav-btn:hover{ 
  background: rgba(20,32,48, 0.95);
  border-color: rgba(152,186,227, 0.4);
  transform: scale(1.1);
  box-shadow: 0 4px 12px rgba(0,0,0,0.35);
}
.carousel-dots{ 
  display:flex; 
  gap:6px; 
  justify-content:center; 
  margin-top:8px; 
  position:absolute; 
  bottom:12px; 
  left:0; 
  right:0;
}
.carousel-dots .dot{ 
  width:8px; 
  height:8px; 
  border-radius:50%; 
  background:color-mix(in oklab, var(--text) 30%, transparent); 
  cursor:pointer; 
  transition: all 0.2s ease;
}
.carousel-dots .dot.active{ 
  background:var(--accent); 
  width:24px; 
  border-radius:4px;
}

/* Match carousel/cluster Read buttons to article card buttons */
.cluster-item .actions .btn,
.carousel-item .actions .btn{
  background: linear-gradient(135deg, var(--zms-300), var(--zms-500));
  color:#fff;
  border:1px solid rgba(152,186,227, 0.35);
  padding: 10px 18px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(89,129,177, 0.2);
  transform: translateY(0) scale(1);
}
.cluster-item .actions .btn:hover,
.carousel-item .actions .btn:hover{
  background: linear-gradient(135deg, var(--zms-100), var(--zms-300));
  transform: translateY(-2px) scale(1);
  box-shadow: 0 4px 16px rgba(89,129,177, 0.35);
  border-color: rgba(152,186,227, 0.5);
}

/* Filter Controls */
.filter-controls {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  margin-bottom: 20px;
}

.filter-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.filter-group label {
  font-size: 0.85rem;
  color: var(--muted);
  font-weight: 600;
}

.filter-group select {
  padding: 8px 12px;
  border-radius: 8px;
  border: 1px solid color-mix(in oklab, var(--text) 20%, transparent);
  background: var(--bg);
  color: var(--text);
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.filter-group select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}

.btn-secondary {
  background: var(--muted);
  color: var(--bg);
  border: 1px solid color-mix(in oklab, var(--muted) 60%, transparent);
  padding: 8px 16px;
  border-radius: 8px;
  font-weight: 600;
  cursor: pointer;
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
  transform: translateY(0) scale(1);
}

.btn-secondary:hover {
  background: color-mix(in oklab, var(--muted) 80%, black);
  transform: translateY(-1px) scale(1);
}

/* Hero section styling for wire page */
.hero-wrap {
  background: radial-gradient(900px 600px at 12% -10%, rgba(152,186,227, 0.22), transparent 70%),
              radial-gradient(900px 600px at 100% 0%, rgba(54,84,117, 0.22), transparent 70%),
              rgba(14,22,35, 0.95);
  padding: 56px 20px 28px;
  position: relative;
}

.hero.home-hero {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 32px;
  align-items: center;
  padding: 0;
  background: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
}

.hero-text {
  text-align: left;
}

.hero-text h1 {
  font-size: clamp(32px, 4.2vw, 54px);
  line-height: 1.05;
  margin: 0 0 10px;
  color: var(--text);
  font-weight: 800;
}

.hero-text .lead {
  color: var(--muted);
  margin: 0 0 18px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.cta {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.hero-primary-cta {
  margin-bottom: 0;
}

.hero-text .btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 16px;
  border-radius: 14px;
  border: 1px solid rgba(152,186,227, 0.1);
  background: rgba(12,20,32, 0.95);
  color: var(--text);
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease, background .12s ease;
  position: relative;
  overflow: visible;
  font-weight: 600;
  text-decoration: none;
  font-size: 0.95rem;
  line-height: 1.2;
  transform: translateY(0) scale(1);
}

.hero-text .btn:hover {
  transform: translateY(-2px) scale(1);
  box-shadow: 0 12px 35px rgba(0,0,0,.45);
  border-color: rgba(152,186,227, 0.25);
  background: rgba(18,28,42, 0.95);
}

/* Primary buttons in hero section - blue gradient styling */
.hero-text .btn.primary,
.hero-primary-cta .btn {
  background: linear-gradient(135deg, var(--zms-300), var(--zms-500));
  color: #fff;
  border-color: rgba(152,186,227, 0.35);
  font-weight: 700;
  box-shadow: 0 10px 30px rgba(89,129,177, 0.25);
}

.hero-text .btn.primary:hover,
.hero-primary-cta .btn:hover {
  background: linear-gradient(135deg, var(--zms-100), var(--zms-300));
  transform: translateY(-2px) scale(1);
  box-shadow: 0 12px 35px rgba(89,129,177, 0.4), 0 4px 12px rgba(0,0,0,0.4);
  border-color: rgba(152,186,227, 0.5);
}

.hero-art {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-art .illustration {
  width: 100%;
  max-width: 540px;
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(0,0,0,.35);
  border: 1px solid rgba(152,186,227, 0.1);
  display: block;
  object-fit: cover;
}

@media (max-width: 1000px) {
  .hero.home-hero {
    display: flex;
    flex-direction: column;
  }
  .hero.home-hero .hero-art {
    order: -1;
    display: flex;
    justify-content: center;
  }
  .hero.home-hero .illustration {
    max-width: min(540px, 90vw);
  }
  .hero-text {
    text-align: center;
  }
}

.hero-search{ margin:10px 0 14px 0; display:grid; gap:10px; grid-template-columns: 1fr; align-items:center; width:100%; max-width:520px }
.hero-search input[type="search"]{
  width:100%;
  min-width:0;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid color-mix(in oklab, var(--text) 14%, transparent);
  background: color-mix(in oklab, var(--bg-elev) 90%, transparent);
  color: var(--text);
  font-size: 1rem;
}
.hero-search input[type="search"]:focus{
  outline:none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in oklab, var(--accent) 20%, transparent);
}
.hero-search input[type="search"]::placeholder{ color: color-mix(in oklab, var(--muted) 90%, transparent) }
.visually-hidden{ position:absolute; width:1px; height:1px; padding:0; margin:-1px; overflow:hidden; clip:rect(0,0,0,0); white-space:nowrap; border:0 }

/* Updated timestamp styling in hero */
#articlesUpdated{ color: var(--muted); font: inherit; max-width:520px; width:100%; }

.hero-search #secFilter{
  padding:10px 14px;
  height:40px;
  line-height:20px;
  border-radius:10px;
}

@media (max-width: 768px) {
  .hero-search{ grid-template-columns: 1fr; justify-items:start }
}

/* Back to Top FAB Button */
#toTop{ 
  position: fixed;
  bottom: 100px;
  right: 20px;
  background: linear-gradient(135deg, var(--zms-300), var(--zms-500));
  color: #fff;
  border: 1px solid rgba(152,186,227, 0.35);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  z-index: 99999;
  cursor: pointer;
  padding: 0;
  margin: 0;
  transform: translateY(0);
}
#toTop.show{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(-4px);
  box-shadow: 0 6px 20px rgba(89,129,177, 0.5), 0 4px 12px rgba(0,0,0,0.4);
}
#toTop:hover{
  background: linear-gradient(135deg, var(--zms-100), var(--zms-300));
  transform: translateY(-4px) scale(1);
  box-shadow: 0 6px 20px rgba(89,129,177, 0.5), 0 4px 12px rgba(0,0,0,0.4);
}

/* Navbar styling - match homepage */
header{
  background: rgb(14,22,35);
  border-bottom: 1px solid rgba(152,186,227, 0.18);
  position: sticky;
  top: 0;
  z-index: 20;
}
.nav{
  max-width: 1200px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 18px;
}
.nav .btn.primary {
  background: linear-gradient(135deg, #5981B1, #365475);
  color: #fff;
  border-color: rgba(152,186,227, 0.35);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  display: inline-block;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease, background 0.2s ease;
  box-shadow: 0 2px 8px rgba(89,129,177, 0.2);
  border: 1px solid rgba(152,186,227, 0.35);
  cursor: pointer;
  transform: translateY(0) scale(1);
}
.nav .btn.primary:hover {
  background: linear-gradient(135deg, #6B9BD1, #4A6B95);
  transform: translateY(-1px) scale(1);
  box-shadow: 0 4px 12px rgba(89,129,177, 0.35);
  border-color: rgba(152,186,227, 0.5);
}
.brand{
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
  font-size: 1.5rem;
  font-weight: 600;
}
.brand .logo-img{
  height: 32px;
  width: auto;
  display: block;
}

/* Footer styling */
footer{ 
  margin-top: auto;
  background: rgba(14,22,35, 0.95);
  border-top: 1px solid rgba(152,186,227, 0.12);
  padding: 24px 0;
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 10;
}
.foot{ 
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
  color: var(--muted);
  text-align: center;
  font-size: 0.9rem;
}

/* Wire page background - already set above */

main{ 
  flex: 1 0 auto;
  padding-bottom: 80px;
}

.wrap{
  padding-top: 40px;
}

/* Help modal */
.help-backdrop{ position:fixed; inset:0; z-index:1000; background: rgba(0,0,0,.6); display:none }
.help-backdrop.show{ display:block }
#videoModal.help-backdrop{ background: rgba(0,0,0,.8) !important; }
.help-dialog{ position:absolute; left:50%; top:50%; transform:translate(-50%,-50%); width:min(720px, 92vw); background: color-mix(in oklab, var(--bg-elev) 90%, black 10%); border:1px solid color-mix(in oklab, var(--text) 12%, transparent); border-radius:16px; padding:16px; box-shadow:var(--shadow) }
.help-dialog h2{ margin:4px 0 10px }
.help-dialog .help-body ul{ margin:0; padding-left:18px }
.help-dialog .btn.small{ 
  position: absolute;
  right: 10px;
  top: 10px;
  transform: translateY(0) scale(1);
  transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.help-dialog .btn.small:hover {
  transform: translateY(-2px) scale(1);
}

/* Video modal: fit to video with gentle padding */
#videoModal .help-dialog{ 
  width:auto; 
  max-width:90vw; 
  padding:12px 12px 16px;
  background: linear-gradient(180deg, rgba(15,25,40, 0.95), rgba(10,18,28, 0.85)) !important;
  border: 1px solid rgba(152,186,227, 0.12) !important;
}
#videoBody{ width:100%; max-width: min(860px, 90vw); }
#videoBody iframe{ display:block; width:100%; height:auto; aspect-ratio:16/9; border-radius:12px }

/* Snapshot progress circle (fills over 60s) */
@property --p{ syntax: '<number>'; initial-value: 0; inherits: false }
.prog{ display:inline-flex; align-items:center; justify-content:center; vertical-align:middle; margin-left:6px }
.prog .ring{
  position:relative; width:14px; height:14px; border-radius:50%;
  background: conic-gradient(var(--accent) calc(var(--p)*1%), transparent 0);
  border:1px solid color-mix(in oklab, var(--text) 20%, transparent);
}
.prog .dot{ display:none }
@keyframes prog-fill{ from{ --p: 0 } to{ --p: 100 } }

/* Filter panel */
.filter-panel{
  position:fixed;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  z-index:100;
  background: rgba(14,22,35, 0.95);
  border:1px solid rgba(152,186,227, 0.18);
  border-radius:16px;
  padding:12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}
.filter-panel.show{
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.filter-toggle{
  position:fixed;
  right:20px;
  top:50%;
  transform:translateY(-50%);
  z-index:101;
  background: linear-gradient(135deg, var(--zms-300), var(--zms-500));
  color:#fff;
  border:1px solid rgba(152,186,227, 0.35);
  border-radius:50%;
  width:50px;
  height:50px;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:1.2rem;
  cursor:pointer;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
  transition: all 0.3s ease;
  transform: translateY(0) scale(1);
}
.filter-toggle:hover{
  background: linear-gradient(135deg, var(--zms-100), var(--zms-300));
  transform: translateY(-2px) scale(1);
  box-shadow: 0 6px 20px rgba(89,129,177, 0.5);
}
.filter-content{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.filter-content .btn{
  white-space:nowrap;
  transform: translateY(0) scale(1);
}
.filter-content .btn:hover{
  transform: translateY(-2px) scale(1);
}
.filter-content .btn.active{
  background: linear-gradient(135deg, var(--zms-300), var(--zms-500));
  color:#fff;
  border-color: rgba(152,186,227, 0.5);
}

.filter-option {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
}

.filter-option input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

.filter-option:hover span {
  color: var(--accent);
}


/* Responsive adjustments - carousels limited to 2 columns, clusters span full width */
@media (min-width: 1200px) {
  .card.carousel{ grid-column: span 2 !important; } /* Max 2 columns */
  .card.cluster{ grid-column: 1 / -1 !important; } /* 4 columns */
}
@media (min-width: 900px) and (max-width: 1199px) {
  .card.carousel{ grid-column: span 2 !important; } /* Max 2 columns */
  .card.cluster{ grid-column: 1 / -1 !important; } /* 3 columns */
}
@media (min-width: 600px) and (max-width: 899px) {
  .card.carousel{ grid-column: span 2 !important; } /* Max 2 columns (full width on 2-col grid) */
  .card.cluster{ grid-column: 1 / -1 !important; } /* 2 columns */
}
@media (max-width: 768px) {
  .card.carousel{ grid-column: 1 / -1 !important; } /* 1 column (full width on mobile) */
  .card.cluster{ grid-column: 1 / -1 !important; } /* 1 column */
  .card.article.wide{ grid-column: span 2 !important; max-width: 100% !important; }
  .carousel-track{ grid-auto-columns: 100% }
  .carousel-item .thumb{ height: 200px }
  .card.carousel{ min-height: 420px }
}
@media (max-width: 1000px){
  .card.article.wide{ grid-column: span 2 !important; max-width: 100% !important; }
}
