/*
Theme Name: StateVista News
Theme URI: https://statevista.site/
Author: StateVista Editorial Team
Author URI: https://statevista.site/about/
Description: A fast, accessible, editorial WordPress theme built for a professional United States news publication. Includes transparent bylines, published and updated dates, article schema, newsroom policy templates, a news sitemap, responsive layouts, and a guided setup screen.
Version: 1.0.0
Requires at least: 6.6
Tested up to: 7.1
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: statevista-news
Tags: news, blog, two-columns, right-sidebar, custom-logo, custom-menu, featured-images, threaded-comments, translation-ready, accessibility-ready, editor-style
*/

:root {
  --sv-navy: #071a33;
  --sv-navy-2: #0d2b4f;
  --sv-red: #c51f2d;
  --sv-red-dark: #9f1722;
  --sv-blue: #1367a8;
  --sv-ink: #101820;
  --sv-muted: #5b6774;
  --sv-line: #dbe2e8;
  --sv-paper: #ffffff;
  --sv-wash: #f3f6f8;
  --sv-gold: #e0aa3e;
  --sv-max: 1240px;
  --sv-reading: 760px;
  --sv-radius: 4px;
  --sv-shadow: 0 12px 30px rgba(7, 26, 51, 0.08);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--sv-ink);
  background: var(--sv-paper);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
figure { margin: 1.8rem 0; }
a { color: var(--sv-blue); text-decoration-thickness: .08em; text-underline-offset: .17em; }
a:hover { color: var(--sv-red-dark); }
button, input, select, textarea { font: inherit; }
button, .button { cursor: pointer; }
:focus-visible { outline: 3px solid var(--sv-gold); outline-offset: 3px; }

.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.screen-reader-text:focus {
  width: auto; height: auto; margin: 0; padding: .75rem 1rem; clip: auto;
  background: #fff; color: #000; top: 8px; left: 8px; z-index: 100000;
}
.skip-link { position: absolute; }

.sv-container { width: min(calc(100% - 32px), var(--sv-max)); margin-inline: auto; }
.sv-reading-width { width: min(100%, var(--sv-reading)); }
.sv-section { padding: 42px 0; }
.sv-rule { border: 0; border-top: 1px solid var(--sv-line); margin: 0; }
.sv-kicker, .cat-links, .sv-section-label {
  color: var(--sv-red); font-weight: 800; font-size: .74rem; line-height: 1.2;
  letter-spacing: .105em; text-transform: uppercase;
}
.sv-section-heading {
  display: flex; align-items: end; justify-content: space-between; gap: 1rem;
  border-top: 4px solid var(--sv-navy); padding-top: 12px; margin-bottom: 22px;
}
.sv-section-heading h2 { margin: 0; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.55rem, 3vw, 2.1rem); line-height: 1.1; }
.sv-section-heading a { font-size: .82rem; font-weight: 750; text-decoration: none; }

/* Masthead */
.sv-utility { background: var(--sv-navy); color: #dbe7f2; font-size: .76rem; letter-spacing: .02em; }
.sv-utility .sv-container { min-height: 34px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.sv-utility a { color: #fff; text-decoration: none; }
.sv-utility-links { display: flex; gap: 1rem; align-items: center; }
.sv-masthead { border-bottom: 1px solid var(--sv-line); background: #fff; }
.sv-masthead-row { min-height: 112px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 24px; }
.sv-brand { display: inline-flex; align-items: center; gap: 12px; color: var(--sv-navy); text-decoration: none; justify-self: center; }
.sv-brand-mark { width: 46px; height: 46px; flex: 0 0 auto; }
.custom-logo { display: block; max-height: 70px; width: auto; }
.sv-brand-copy { display: flex; flex-direction: column; }
.sv-brand-name { font-family: Georgia, "Times New Roman", serif; font-weight: 800; font-size: clamp(1.85rem, 4vw, 2.8rem); line-height: .95; letter-spacing: -.04em; }
.sv-tagline { margin-top: 7px; color: var(--sv-muted); font-size: .71rem; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; }
.sv-masthead-side { color: var(--sv-muted); font-size: .76rem; }
.sv-masthead-side.right { text-align: right; }
.sv-search-toggle, .sv-menu-toggle {
  border: 1px solid var(--sv-line); background: #fff; color: var(--sv-navy); border-radius: 999px;
  min-width: 42px; min-height: 42px; padding: 0 14px; font-weight: 750;
}
.sv-menu-toggle { display: none; }

.sv-nav { border-bottom: 1px solid var(--sv-line); background: #fff; position: relative; z-index: 20; }
.sv-nav .menu, .sv-nav ul { list-style: none; margin: 0; padding: 0; display: flex; align-items: center; justify-content: center; gap: clamp(18px, 3vw, 36px); }
.sv-nav a { display: block; padding: 13px 0 11px; color: var(--sv-ink); text-decoration: none; font-size: .79rem; font-weight: 800; letter-spacing: .035em; text-transform: uppercase; border-bottom: 3px solid transparent; }
.sv-nav a:hover, .sv-nav .current-menu-item > a, .sv-nav .current_page_item > a { color: var(--sv-red); border-bottom-color: var(--sv-red); }
.sv-search-panel { display: none; border-bottom: 1px solid var(--sv-line); background: var(--sv-wash); padding: 18px 0; }
.sv-search-panel.is-open { display: block; }
.search-form { display: flex; gap: 8px; max-width: 720px; margin-inline: auto; }
.search-form label { flex: 1; }
.search-field { width: 100%; min-height: 46px; border: 1px solid #b9c3cc; border-radius: 3px; padding: 9px 13px; background: #fff; }
.search-submit, .sv-submit, .button {
  min-height: 46px; border: 0; border-radius: 3px; background: var(--sv-red); color: #fff;
  padding: 10px 18px; font-weight: 800; text-decoration: none;
}
.search-submit:hover, .sv-submit:hover, .button:hover { background: var(--sv-red-dark); color: #fff; }

.sv-breaking { background: var(--sv-navy-2); color: #fff; border-bottom: 3px solid var(--sv-red); }
.sv-breaking-inner { min-height: 43px; display: grid; grid-template-columns: auto 1fr; align-items: center; }
.sv-breaking-label { align-self: stretch; display: flex; align-items: center; padding: 0 18px; background: var(--sv-red); font-size: .74rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.sv-breaking a { color: #fff; text-decoration: none; font-weight: 700; margin-left: 18px; }

/* Cards and home */
.sv-lead-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(300px, .9fr); gap: 28px; padding: 32px 0 38px; border-bottom: 1px solid var(--sv-line); }
.sv-lead-card { position: relative; }
.sv-card-image { display: block; overflow: hidden; background: #e8edf1; aspect-ratio: 16/9; }
.sv-card-image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.sv-card:hover .sv-card-image img, .sv-lead-card:hover .sv-card-image img { transform: scale(1.018); }
.sv-image-placeholder { width: 100%; height: 100%; display: grid; place-items: center; color: #718092; background: linear-gradient(135deg, #e7ecf1, #f7f9fa); }
.sv-image-placeholder svg { width: 54px; height: 54px; opacity: .6; }
.sv-lead-card h1, .sv-lead-card h2 { margin: 12px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(2rem, 4.2vw, 3.35rem); line-height: 1.02; letter-spacing: -.035em; }
.sv-lead-card h1 a, .sv-lead-card h2 a, .sv-card-title a, .sv-list-title a { color: var(--sv-ink); text-decoration: none; }
.sv-lead-card h1 a:hover, .sv-lead-card h2 a:hover, .sv-card-title a:hover, .sv-list-title a:hover { color: var(--sv-red-dark); }
.sv-dek { margin: 0; color: #384653; font-family: Georgia, "Times New Roman", serif; font-size: 1.09rem; line-height: 1.55; }
.sv-lead-side { display: grid; grid-template-columns: 1fr; align-content: start; }
.sv-lead-side .sv-card { padding: 0 0 18px; margin-bottom: 18px; border-bottom: 1px solid var(--sv-line); }
.sv-lead-side .sv-card:last-child { margin-bottom: 0; }
.sv-card-title { margin: 7px 0 6px; font-family: Georgia, "Times New Roman", serif; font-size: 1.35rem; line-height: 1.16; letter-spacing: -.012em; }
.sv-card-excerpt { color: var(--sv-muted); font-size: .91rem; margin: 0; }
.sv-meta { display: flex; flex-wrap: wrap; gap: 6px 12px; align-items: center; color: var(--sv-muted); font-size: .76rem; }
.sv-meta a { color: inherit; text-decoration: none; }
.sv-meta a:hover { color: var(--sv-red); }
.sv-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 26px; }
.sv-grid.four { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.sv-card { min-width: 0; }
.sv-card.compact { display: grid; grid-template-columns: 128px 1fr; gap: 15px; }
.sv-card.compact .sv-card-image { aspect-ratio: 4/3; }
.sv-card.compact .sv-card-title { font-size: 1.08rem; margin-top: 3px; }
.sv-latest-layout { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 46px; align-items: start; }
.sv-story-list { border-top: 1px solid var(--sv-line); }
.sv-list-story { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; padding: 24px 0; border-bottom: 1px solid var(--sv-line); }
.sv-list-story .sv-card-image { aspect-ratio: 16/10; }
.sv-list-title { margin: 6px 0 8px; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.35rem, 2.5vw, 1.8rem); line-height: 1.16; }
.sv-sidebar { position: sticky; top: 20px; }
.widget { margin-bottom: 30px; padding-top: 14px; border-top: 4px solid var(--sv-navy); }
.widget-title { margin: 0 0 14px; font-family: Georgia, "Times New Roman", serif; font-size: 1.28rem; }
.widget ul { list-style: none; padding: 0; margin: 0; }
.widget li { padding: 9px 0; border-bottom: 1px solid var(--sv-line); }
.widget a { color: var(--sv-ink); text-decoration: none; font-weight: 700; }
.sv-trust-card { background: var(--sv-wash); padding: 22px; border-left: 4px solid var(--sv-red); }
.sv-trust-card h3 { margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; }
.sv-trust-card p { margin: 0 0 14px; color: var(--sv-muted); font-size: .9rem; }

/* Articles */
.sv-main { min-height: 55vh; }
.sv-article { padding: 44px 0 70px; }
.sv-breadcrumbs { color: var(--sv-muted); font-size: .78rem; margin-bottom: 24px; }
.sv-breadcrumbs a { color: inherit; text-decoration: none; }
.sv-article-header { width: min(100%, 980px); }
.sv-article-title { margin: 10px 0 14px; color: var(--sv-ink); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.4rem, 6vw, 4.8rem); line-height: .99; letter-spacing: -.045em; }
.sv-article-dek { max-width: 850px; margin: 0 0 18px; color: #3d4b58; font-family: Georgia, "Times New Roman", serif; font-size: clamp(1.12rem, 2vw, 1.38rem); line-height: 1.48; }
.sv-byline-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 15px; padding: 16px 0; border-top: 1px solid var(--sv-line); border-bottom: 1px solid var(--sv-line); }
.sv-byline { font-size: .86rem; }
.sv-byline strong { color: var(--sv-navy); }
.sv-share { display: flex; gap: 8px; align-items: center; }
.sv-share a { display: inline-grid; place-items: center; min-width: 36px; height: 36px; padding: 0 10px; border: 1px solid var(--sv-line); border-radius: 999px; color: var(--sv-navy); text-decoration: none; font-size: .72rem; font-weight: 800; }
.sv-featured { width: min(100%, 1120px); margin: 30px 0 34px; }
.sv-featured img { width: 100%; display: block; }
.wp-caption-text, figcaption { margin-top: 8px; color: var(--sv-muted); font-size: .78rem; line-height: 1.45; }
.sv-article-layout { display: grid; grid-template-columns: minmax(0, var(--sv-reading)) 300px; gap: 62px; align-items: start; }
.sv-content { font-family: Georgia, "Times New Roman", serif; font-size: 1.105rem; line-height: 1.78; }
.sv-content > *:first-child { margin-top: 0; }
.sv-content p { margin: 0 0 1.45em; }
.sv-content h2, .sv-content h3, .sv-content h4 { color: var(--sv-navy); line-height: 1.2; margin: 1.7em 0 .7em; }
.sv-content h2 { font-size: 1.75rem; }
.sv-content h3 { font-size: 1.4rem; }
.sv-content blockquote { margin: 1.8em 0; padding: 8px 0 8px 24px; border-left: 5px solid var(--sv-red); color: #2d3945; font-size: 1.22rem; line-height: 1.55; }
.sv-content a { overflow-wrap: anywhere; }
.sv-content table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; font-family: Inter, sans-serif; font-size: .9rem; }
.sv-content th, .sv-content td { border: 1px solid var(--sv-line); padding: 10px 12px; text-align: left; }
.sv-content th { background: var(--sv-wash); }
.sv-correction-note { margin: 28px 0; padding: 14px 16px; border: 1px solid #f0d49c; background: #fff9ec; font-family: Inter, sans-serif; font-size: .86rem; }
.sv-tags { margin: 28px 0; font-family: Inter, sans-serif; font-size: .82rem; }
.sv-tags a { display: inline-block; margin: 4px 5px 4px 0; padding: 5px 9px; border: 1px solid var(--sv-line); border-radius: 2px; text-decoration: none; }
.sv-author-box { margin-top: 36px; padding: 24px; background: var(--sv-wash); border-top: 4px solid var(--sv-navy); font-family: Inter, sans-serif; }
.sv-author-box h2 { margin: 0 0 4px; font-family: Georgia, "Times New Roman", serif; font-size: 1.45rem; }
.sv-author-role { color: var(--sv-red); font-size: .76rem; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.sv-author-box p { margin: 10px 0 0; font-size: .91rem; }
.sv-disclosure { margin-top: 16px; color: var(--sv-muted); font-family: Inter, sans-serif; font-size: .78rem; }
.sv-related { margin-top: 48px; }

/* Pages, archives, forms */
.sv-page-header { padding: 42px 0 24px; border-bottom: 1px solid var(--sv-line); background: var(--sv-wash); }
.sv-page-title { margin: 0; color: var(--sv-navy); font-family: Georgia, "Times New Roman", serif; font-size: clamp(2.2rem, 5vw, 3.8rem); line-height: 1.05; }
.sv-page-description { max-width: 760px; color: var(--sv-muted); }
.sv-page-content { padding: 42px 0 70px; }
.sv-policy { width: min(100%, 820px); }
.sv-policy h2 { margin-top: 2rem; color: var(--sv-navy); font-family: Georgia, "Times New Roman", serif; }
.sv-notice { padding: 14px 16px; background: #eef5fb; border-left: 4px solid var(--sv-blue); }
.sv-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.sv-field { margin-bottom: 16px; }
.sv-field label { display: block; margin-bottom: 5px; font-weight: 750; font-size: .86rem; }
.sv-field input, .sv-field textarea, .sv-field select { width: 100%; border: 1px solid #aeb9c2; border-radius: 3px; padding: 11px 12px; background: #fff; }
.sv-field textarea { min-height: 170px; resize: vertical; }
.sv-honeypot { position: absolute; left: -9999px; }
.sv-alert { padding: 13px 16px; margin-bottom: 18px; border-radius: 3px; }
.sv-alert.success { background: #e9f7ef; color: #185a32; }
.sv-alert.error { background: #fff0f0; color: #8d1e27; }
.navigation.pagination { margin-top: 36px; }
.nav-links { display: flex; flex-wrap: wrap; gap: 7px; }
.page-numbers { min-width: 40px; min-height: 40px; display: inline-grid; place-items: center; padding: 6px 10px; border: 1px solid var(--sv-line); text-decoration: none; }
.page-numbers.current { background: var(--sv-navy); color: #fff; border-color: var(--sv-navy); }
.sv-empty { padding: 70px 0; text-align: center; }
.sv-empty h1 { font-family: Georgia, "Times New Roman", serif; font-size: 2.5rem; }

/* Footer */
.sv-footer { background: var(--sv-navy); color: #dbe7f2; }
.sv-footer-main { display: grid; grid-template-columns: 1.3fr .8fr .8fr .8fr; gap: 38px; padding: 48px 0; }
.sv-footer h2, .sv-footer h3 { color: #fff; font-family: Georgia, "Times New Roman", serif; }
.sv-footer h3 { margin: 0 0 13px; font-size: 1.05rem; }
.sv-footer p { font-size: .86rem; }
.sv-footer ul { list-style: none; padding: 0; margin: 0; }
.sv-footer li { margin: 7px 0; }
.sv-footer a { color: #dbe7f2; text-decoration: none; font-size: .84rem; }
.sv-footer a:hover { color: #fff; text-decoration: underline; }
.sv-footer-brand { color: #fff; font-family: Georgia, "Times New Roman", serif; font-size: 1.8rem; font-weight: 800; }
.sv-footer-bottom { border-top: 1px solid rgba(255,255,255,.16); padding: 16px 0 24px; font-size: .75rem; }
.sv-footer-bottom .sv-container { display: flex; justify-content: space-between; gap: 16px; }

.alignleft { float: left; margin: .4rem 1.5rem 1rem 0; }
.alignright { float: right; margin: .4rem 0 1rem 1.5rem; }
.aligncenter { display: block; margin-left: auto; margin-right: auto; }
.wp-block-image.alignwide, .alignwide { width: min(100vw - 32px, 1020px); max-width: none; }
.wp-block-image.alignfull, .alignfull { width: 100vw; max-width: none; margin-left: calc(50% - 50vw); }
.gallery { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }

@media (max-width: 980px) {
  .sv-masthead-row { grid-template-columns: auto 1fr auto; min-height: 88px; }
  .sv-masthead-side:first-child { display: none; }
  .sv-brand { justify-self: start; }
  .sv-tagline { display: none; }
  .sv-menu-toggle { display: inline-block; }
  .sv-nav .sv-container { padding: 0; width: 100%; }
  .sv-nav ul, .sv-nav .menu { display: none; align-items: stretch; flex-direction: column; gap: 0; padding: 8px 16px 16px; }
  .sv-nav.is-open ul, .sv-nav.is-open .menu { display: flex; }
  .sv-nav a { padding: 11px 4px; border-bottom: 1px solid var(--sv-line); }
  .sv-lead-grid, .sv-latest-layout, .sv-article-layout { grid-template-columns: 1fr; }
  .sv-lead-side { grid-template-columns: 1fr 1fr; gap: 22px; }
  .sv-sidebar { position: static; }
  .sv-grid.four { grid-template-columns: repeat(2, 1fr); }
  .sv-footer-main { grid-template-columns: 1.2fr 1fr 1fr; }
  .sv-footer-main > :first-child { grid-column: 1 / -1; }
}

@media (max-width: 680px) {
  .sv-container { width: min(calc(100% - 24px), var(--sv-max)); }
  .sv-utility-links { display: none; }
  .sv-masthead-row { gap: 10px; }
  .sv-brand-mark { width: 35px; height: 35px; }
  .sv-brand-name { font-size: 1.7rem; }
  .sv-search-toggle { min-width: 38px; min-height: 38px; padding: 0 10px; }
  .sv-breaking-inner { grid-template-columns: 105px 1fr; }
  .sv-breaking-label { padding: 0 10px; }
  .sv-breaking a { margin-left: 10px; font-size: .83rem; }
  .sv-lead-grid { padding-top: 22px; }
  .sv-lead-side, .sv-grid, .sv-grid.four { grid-template-columns: 1fr; }
  .sv-card.compact, .sv-list-story { grid-template-columns: 116px 1fr; gap: 14px; }
  .sv-list-story .sv-card-excerpt { display: none; }
  .sv-article { padding-top: 28px; }
  .sv-article-title { font-size: 2.45rem; }
  .sv-article-layout { gap: 36px; }
  .sv-content { font-size: 1.045rem; }
  .sv-byline-row { align-items: flex-start; flex-direction: column; }
  .sv-form-grid { grid-template-columns: 1fr; }
  .sv-footer-main { grid-template-columns: 1fr 1fr; gap: 28px; }
  .sv-footer-main > :first-child { grid-column: 1 / -1; }
  .sv-footer-bottom .sv-container { flex-direction: column; }
}

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

@media print {
  .sv-utility, .sv-nav, .sv-breaking, .sv-search-panel, .sv-share, .sv-sidebar, .sv-footer { display: none !important; }
  body { color: #000; font-size: 12pt; }
  a { color: #000; text-decoration: none; }
  .sv-article-layout { display: block; }
}
