:root{
  --ausnews-container: 1200px;
  --ausnews-max: var(--ausnews-container);
  --ausnews-gutter: clamp(16px, 3vw, 28px);
  --ausnews-accent: #c40000;
  --ausnews-font-size: 16px;

  --ausnews-bg: #ffffff;
    --ausnews-surface: var(--ausnews-bg);
--ausnews-text: #101114;
  --ausnews-muted: #5d6470;
  --ausnews-border: #e7e9ee;
  --ausnews-card: #ffffff;

  --ausnews-radius: 12px;
  --ausnews-shadow: 0 1px 2px rgba(16,17,20,.06), 0 8px 28px rgba(16,17,20,.08);

  --ausnews-logo-height: 80px;
  --ausnews-logo-maxw: 396px;

  --ausnews-font: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  line-height: 1.5;
}

*{ box-sizing: border-box; }
body{margin:0; background: var(--ausnews-bg); color: var(--ausnews-text); font-family: var(--ausnews-font); font-size: var(--ausnews-font-size); line-height: 1.5;}
a{ color: inherit; text-decoration: none; }
a:hover{ color: var(--ausnews-accent); }

.ausnews-max{max-width: var(--ausnews-max); margin: 0 auto; padding: 0 var(--ausnews-gutter);}



.ausnews-navrow{
  position: sticky;
  top: 0;
  z-index: 999;
  background: var(--ausnews-surface, var(--ausnews-bg));
  border-bottom: 1px solid var(--ausnews-border);
  box-shadow: 0 1px 0 rgba(0,0,0,.04);
}
.admin-bar .ausnews-navrow{ top: 32px; }
@media (max-width: 782px){ .admin-bar .ausnews-navrow{ top: 46px; } }

/* Sticky/fixed nav behavior (JS enhances when needed) */
.ausnews-navrow.is-fixed{
  position: fixed;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--ausnews-surface, var(--ausnews-bg));
}



.ausnews-brand{
  border-bottom: 1px solid var(--ausnews-border);
}
.ausnews-brand__inner{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  padding: 14px 0;
  gap: 12px;
}
.ausnews-brand__center{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  text-align: center;
}

.custom-logo{
  height: var(--ausnews-logo-height, 80px);
  width: auto;
  max-width: var(--ausnews-logo-maxw, 396px);
  object-fit: contain;
  display: block;
}
.custom-logo-link{ display: inline-flex; align-items: center; justify-content:center; }

.ausnews-site-title{
  font-weight: 900;
  letter-spacing: -0.02em;
  font-size: 28px;
  margin: 0;
  display: none;
}

.ausnews-actions{
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}
.ausnews-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  padding: 10px 14px;
  font-weight: 800;
  font-size: 13px;
  border: 1px solid var(--ausnews-border);
  background: var(--ausnews-surface, var(--ausnews-bg));
}
.ausnews-btn--accent{
  background: var(--ausnews-accent);
  border-color: var(--ausnews-accent);
  color: white;
}

.admin-bar @media (max-width: 782px){ .admin-bar }
body.admin-bar .admin-bar @media (max-width: 782px){ .admin-bar }
@media (max-width: 782px){
  body.admin-bar .admin-bar @media (max-width: 782px){ .admin-bar }
}

.ausnews-navrow__inner{
  min-height: var(--ausnews-nav-height);
  display: grid;
  grid-template-columns: 48px 1fr 48px;
  align-items: center;
  position: relative;
}

.ausnews-iconbtn{
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid transparent;
  background: transparent;
  cursor: pointer;
}
.ausnews-iconbtn:hover{
  border-color: var(--ausnews-border);
  background: var(--ausnews-surface, var(--ausnews-bg));
}
.ausnews-iconbtn svg{ width: 18px; height: 18px; display: block; }

.ausnews-menu{
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 18px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-weight: 800;
  font-size: 14px;
  white-space: nowrap;
  overflow-x: auto;
  scrollbar-width: none;
}
.ausnews-menu::-webkit-scrollbar{ display: none; }
.ausnews-menu a{ padding: 10px 6px; display: inline-block; }
.ausnews-menu .current-menu-item > a{ color: var(--ausnews-accent); }

.ausnews-mobile-toggle{ display: none; }
@media (max-width: 860px){
  .ausnews-menu{ display: none; }
  .ausnews-mobile-toggle{ display: inline-flex; justify-content: center; }
  .ausnews-navrow.is-open .ausnews-menu{
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    top: calc(100% + 1px);
    background: var(--ausnews-bg);
    border-bottom: 1px solid var(--ausnews-border);
    padding: 10px var(--ausnews-gutter);
    justify-content: flex-start;
    gap: 12px;
  }
}

.ausnews-search-panel{
  display: none;
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: min(420px, 92vw);
  background: var(--ausnews-bg);
  border: 1px solid var(--ausnews-border);
  border-radius: var(--ausnews-radius);
  box-shadow: var(--ausnews-shadow);
  padding: 12px;
}
.ausnews-search-panel.is-open{ display: block; }
.ausnews-search-panel input[type="search"]{
  width: 100%;
  border: 1px solid var(--ausnews-border);
  border-radius: 999px;
  padding: 10px 14px;
  outline: none;
  font-size: 14px;
}
.ausnews-search-panel button{
  margin-top: 10px;
  width: 100%;
  border-radius: 999px;
  border: 1px solid var(--ausnews-border);
  background: var(--ausnews-surface, var(--ausnews-bg));
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
}

main{ padding: 24px 0 48px; }

.ausnews-sectionhead{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  margin: 0 0 12px;
}
.widget-title{
  font-weight: 900;
  letter-spacing: -0.02em;
  display: inline-block;
  margin: 0;
  padding-bottom: 6px;
  border-bottom: 3px solid var(--ausnews-text);
}

/* Rail alignment fixes (homepage/category sidebars) */
.ausnews-rail{ text-align: left; }
.ausnews-rail .widget{ text-align: left; }
.ausnews-rail .ausnews-sectionhead{
  width: 100%;
  justify-content: flex-start;
}
.ausnews-rail .ausnews-sectionhead .ausnews-viewall{ margin-left: auto; }
.ausnews-rail .widget-title{ text-align: left; }

.ausnews-viewall{
  font-weight: 900;
  color: var(--ausnews-muted);
  font-size: 13px;
  white-space: nowrap;
}
.ausnews-viewall:hover{ color: var(--ausnews-accent); }

/* News-style category tab header (title left + links right) */
.ausnews-tabhead{
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  margin: 0 0 12px;
  padding-bottom: 10px;
  border-bottom: 1px solid rgba(211,29,29,.28);
}
.ausnews-tabhead__title{
  font-weight: 900;
  color: var(--ausnews-accent);
  font-size: clamp(1.4rem, 1.9vw, 1.8rem);
  letter-spacing: -0.02em;
}
.ausnews-tabs{
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: baseline;
  justify-content: flex-end;
  font-weight: 900;
  font-size: 13px;
  color: var(--ausnews-accent);
}
.ausnews-tabs a{ color: var(--ausnews-accent); }
.ausnews-tabs a:hover{ text-decoration: underline; }

.ausnews-banner{
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  align-items: start;
}
@media (max-width: 980px){
  .ausnews-banner{ grid-template-columns: 1fr; }
}
.ausnews-justin{
  border-left: 1px solid var(--ausnews-border);
  padding-left: 18px;
}
@media (max-width: 980px){
  .ausnews-justin{ border-left: none; padding-left: 0; }
}

.ausnews-card{
  border: 1px solid var(--ausnews-border);
  border-radius: var(--ausnews-radius);
  box-shadow: var(--ausnews-shadow);
  overflow: hidden;
  background: var(--ausnews-bg);
}
.ausnews-card__body{ padding: 14px; }
.ausnews-kicker{
  font-size: 12px;
  font-weight: 900;
  color: var(--ausnews-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.ausnews-card__title{
  margin: 0;
  font-weight: 900;
  letter-spacing: -0.02em;
  line-height: 1.12;
  font-size: 18px;
}
.ausnews-thumb{display:block; position:relative; overflow:hidden; border-radius:12px; background:#111; aspect-ratio:16/9;}
.ausnews-thumb img{width:100%; height:100%; object-fit:cover; object-position:center; display:block;}
.ausnews-thumb--hero{aspect-ratio:16/9;}
.wp-post-image{max-width:100%; height:auto; display:block;}
img{max-width:100%; height:auto;}


.ausnews-card--banner .ausnews-card__title{
  font-size: clamp(1.8rem, 2.6vw, 2.6rem);
  line-height: 1.05;
}
.ausnews-excerpt{ color: var(--ausnews-muted); margin-top: 10px; }

.ausnews-list{ display: grid; gap: 14px; }
.ausnews-list__item{
  display: grid;
  grid-template-columns: 110px 1fr;
  gap: 12px;
  align-items: start;
  padding: 10px 0;
  border-bottom: 1px solid var(--ausnews-border);
}
.ausnews-list__item:last-child{ border-bottom: none; }
@media (max-width: 520px){
  .ausnews-list__item{ grid-template-columns: 1fr; }
}
.ausnews-list__body{ min-width: 0; }

.ausnews-leadgrid{ display: grid; gap: 16px; }
.ausnews-card--lead .ausnews-card__title{ font-size: 22px; }
.ausnews-grid{
  display: grid;
  grid-template-columns: repeat(2,1fr);
  gap: 14px;
}
@media (max-width: 860px){
  .ausnews-grid{ grid-template-columns: 1fr; }
}
.ausnews-grid-3{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 14px;
}
@media (max-width: 980px){
  .ausnews-grid-3{ grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 680px){
  .ausnews-grid-3{ grid-template-columns: 1fr; }
}

.ausnews-card--tile .ausnews-card__title{ font-size: 16px; }

.site-content{
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 24px;
  align-items: start;
}
@media (max-width: 1180px){
  .site-content{ grid-template-columns: minmax(0, 1fr) 320px; }
}
@media (max-width: 980px){
  .site-content{ grid-template-columns: 1fr; }
}


.site-footer{
  border-top: 1px solid var(--ausnews-border);
  background: var(--ausnews-surface, var(--ausnews-bg));
  padding: 28px 0;
}
.footer-grid{
  display: grid;
  grid-template-columns: repeat(3,1fr);
  gap: 24px;
}
@media (max-width: 860px){
  .footer-grid{ grid-template-columns: 1fr; }
}

.entry-title{ font-weight: 900; letter-spacing: -0.02em; }
.entry-meta{ color: var(--ausnews-muted); font-size: 13px; margin-bottom: 16px; }
.entry-content img{ max-width: 100%; height: auto; }
.wp-block-image, .wp-block-gallery{ margin: 18px 0; }

/* Widget spacing */
.widget{ margin: 0 0 22px; }
.widget:last-child{ margin-bottom: 0; }

.ausnews-btn--ghost{background:transparent;}


/* news.com.au-ish section styling */
.ausnews-tabhead{
  border-top: 1px solid var(--ausnews-border);
  border-bottom: 2px solid #d0021b;
  padding-top: 10px;
  padding-bottom: 10px;
  margin-top: 18px;
}
.ausnews-tabhead__title,
.ausnews-sectionhead .widget-title{
  color: #d0021b;
  font-weight: 800;
  letter-spacing: .2px;
}
.ausnews-tabs a{
  color: #d0021b;
  font-weight: 600;
}
.ausnews-tabs a:hover{ text-decoration: underline; }


/* Color schemes */
.scheme-dark{
  --ausnews-bg:#0b0c10;
  --ausnews-surface:#0b0c10;
  --ausnews-text:#f3f5f7;
  --ausnews-muted:#b7bdc7;
  --ausnews-border:#262a33;
  --ausnews-card:#11141a;
  --ausnews-shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.35);
}
@media (prefers-color-scheme: dark){
  .scheme-auto{
    --ausnews-bg:#0b0c10;
    --ausnews-surface:#0b0c10;
    --ausnews-text:#f3f5f7;
    --ausnews-muted:#b7bdc7;
    --ausnews-border:#262a33;
    --ausnews-card:#11141a;
    --ausnews-shadow: 0 1px 2px rgba(0,0,0,.35), 0 10px 30px rgba(0,0,0,.35);
  }
}

/* Ensure navrow background follows the selected color scheme (light/dark/auto). */
.scheme-dark .ausnews-navrow,
.scheme-dark .ausnews-navrow.is-fixed{
  background: var(--ausnews-bg) !important;
}

@media (prefers-color-scheme: dark){
  .scheme-auto .ausnews-navrow,
  .scheme-auto .ausnews-navrow.is-fixed{
    background: var(--ausnews-bg) !important;
  }
}

/* Text scaling */
.text-lg{ --ausnews-font-size: 18px; }
.text-xl{ --ausnews-font-size: 20px; }

/* Link style options */
.links-underlined a{ text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 2px; }

/* High contrast (simple) */
.contrast-high{
  --ausnews-bg:#ffffff;
  --ausnews-text:#000000;
  --ausnews-muted:#111111;
  --ausnews-border:#000000;
  --ausnews-card:#ffffff;
  --ausnews-accent:#000000;
  --ausnews-shadow:none;
}

/* Focus styles */
:focus-visible{
  outline: 3px solid var(--ausnews-accent);
  outline-offset: 3px;
}

/* Skip link */
.skip-link{
  position:absolute;
  left:-9999px;
  top: 8px;
  z-index: 9999;
  padding: 10px 12px;
  background: var(--ausnews-bg);
  color: var(--ausnews-text);
  border: 2px solid var(--ausnews-accent);
  border-radius: 10px;
  text-decoration: none;
}
.skip-link:focus{ left: 12px; }

/* Reduce motion */
@media (prefers-reduced-motion: reduce){
  *{ scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}
.reduce-motion *{ scroll-behavior: auto !important; transition: none !important; animation: none !important; }


.ausnews-searchpanel[hidden]{display:none !important;}


/* Home sections (front-page options) */
.ausnews-home-section{ margin-top: 0; }


/* Footer theme toggle */
.footer-bottom{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding-top: 18px;
  color: var(--ausnews-muted);
  font-size: 13px;
}
@media (max-width: 860px){
  .footer-bottom{ flex-direction: column; align-items: flex-start; }
}
.ausnews-theme-toggle{
  display:flex;
  align-items:center;
  gap:8px;
  flex-wrap: wrap;
}
.ausnews-theme-toggle__label{
  font-weight:600;
  color: var(--ausnews-text);
  opacity: .85;
  margin-right: 6px;
}
.ausnews-theme-toggle button{
  appearance:none;
  border:1px solid var(--ausnews-border);
  background: var(--ausnews-card);
  color: var(--ausnews-text);
  padding:6px 10px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1;
  cursor:pointer;
}
.ausnews-theme-toggle button[aria-pressed="true"]{
  background: var(--ausnews-text);
  color: var(--ausnews-bg);
  border-color: var(--ausnews-text);
}
.ausnews-theme-toggle button:focus-visible{
  outline: 3px solid var(--ausnews-accent);
  outline-offset: 2px;
}


@media (max-width: 600px){
  .ausnews-actions{ justify-content: flex-start; }
  .ausnews-btn{ padding: 8px 12px; font-size: 12px; }
}
