:root{
  --nw-max: 1520px;
  --nw-gutter: 22px;

  --nw-bg: #f6f7f9;
  --nw-surface: #ffffff;
  --nw-surface-2: #f2f4f7;
  --nw-text: #0f172a;
  --nw-muted: #475569;
  --nw-border: #d6dbe3;

  --nw-primary: #0b5cab;
  --nw-navy-1: #0b2b55;
  --nw-navy-2: #0b4f8f;
  --nw-focus: #f59e0b;

  --nw-radius: 16px;
  --nw-shadow: 0 18px 40px rgba(2, 6, 23, 0.12);
}

body{ background: var(--nw-bg); color: var(--nw-text); }

.nw-wrap{
  max-width: var(--nw-max);
  margin: 0 auto;
  padding: 0 var(--nw-gutter);
}

/* HERO */
.nw-hero{
  background: linear-gradient(180deg, #ffffff 0%, #f7f9fc 100%);
  border-bottom: 1px solid var(--nw-border);
}
.nw-hero__grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 16px;
  padding: 26px 0;
  align-items: stretch;
}
.nw-kicker{
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid var(--nw-border);
  border-radius: 999px;
  background: #fff;
  color: var(--nw-muted);
  font-weight: 950;
}
.nw-kicker__logo{ width: 20px; height: 20px; object-fit: contain; }

.nw-title{
  margin: 12px 0 8px;
  font-size: clamp(1.85rem, 2.2vw, 2.55rem);
  font-weight: 950;
  letter-spacing: 0.2px;
}
.nw-lead{
  margin: 0 0 14px;
  color: var(--nw-muted);
  max-width: 100ch;
}

.nw-tools{
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 12px;
}
.nw-label{
  display: block;
  font-size: 0.9rem;
  color: var(--nw-muted);
  font-weight: 950;
  margin-bottom: 6px;
}
.nw-search input,
.nw-select select{
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--nw-border);
  background: #fff;
  font-weight: 850;
  outline: none;
}
.nw-search input{
  width: min(420px, 84vw);
}
.nw-search input:focus,
.nw-select select:focus{
  border-color: rgba(11,92,171,0.6);
  box-shadow: 0 0 0 3px rgba(245,158,11,0.20);
}

.nw-note{
  margin-top: 12px;
  padding: 12px 14px;
  border-radius: 14px;
  border: 1px solid var(--nw-border);
  background: var(--nw-surface-2);
  color: var(--nw-muted);
  line-height: 1.45;
}
.nw-note code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-weight: 900;
  color: var(--nw-navy-1);
}

.nw-hero__media{
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  overflow: hidden;
  background: #fff;
  box-shadow: var(--nw-shadow);
  min-height: 320px;
}
.nw-hero__media img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nw-media-ph{
  width: 100%;
  height: 100%;
  min-height: 320px;
  display: grid;
  place-items: center;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* MAIN */
.nw-main{ padding: 26px 0 46px; }
.nw-section{ margin-top: 18px; }
.nw-section__head{ margin-bottom: 12px; }

.nw-h2{
  margin: 0 0 10px;
  font-size: 1.35rem;
  font-weight: 950;
  letter-spacing: 0.2px;
}
.nw-sub{
  margin: 0;
  color: var(--nw-muted);
  max-width: 110ch;
}

/* Featured card */
.nw-featured{
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: 0 14px 32px rgba(2,6,23,0.10);
  overflow: hidden;
}
.nw-featured__grid{
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 0;
}
.nw-featured__text{
  padding: 16px;
}
.nw-featured__img{
  border-left: 1px solid var(--nw-border);
  min-height: 240px;
}
.nw-featured__img img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nw-img-ph{
  width: 100%;
  height: 100%;
  min-height: 240px;
  display: grid;
  place-items: center;
  border: 2px dashed #cbd5e1;
  background: #f8fafc;
  color: #64748b;
  font-weight: 950;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.nw-meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--nw-muted);
  font-weight: 850;
  margin-bottom: 8px;
}
.nw-pill{
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid var(--nw-border);
  background: #fbfdff;
  color: var(--nw-muted);
  font-weight: 900;
}
.nw-pill--primary{
  border-color: rgba(11,92,171,0.25);
  background: rgba(11,92,171,0.10);
  color: var(--nw-navy-1);
}
.nw-featured__title{
  margin: 0 0 8px;
  font-weight: 950;
  color: var(--nw-text);
  font-size: 1.2rem;
}
.nw-featured__excerpt{
  margin: 0 0 12px;
  color: var(--nw-muted);
  line-height: 1.55;
}
.nw-actions{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nw-btn{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--nw-border);
  background: #fff;
  color: var(--nw-primary);
  font-weight: 950;
  cursor: pointer;
  text-decoration: none;
}
.nw-btn:hover{ text-decoration: none; filter: brightness(1.03); }
.nw-btn--primary{
  border-color: rgba(11, 43, 85, 0.55);
  background: linear-gradient(180deg, var(--nw-primary) 0%, var(--nw-navy-2) 55%, var(--nw-navy-1) 100%);
  color: #fff;
}

/* Grid list */
.nw-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0,1fr));
  gap: 12px;
}
.nw-card{
  border: 1px solid var(--nw-border);
  border-radius: var(--nw-radius);
  background: #fff;
  box-shadow: 0 12px 26px rgba(2,6,23,0.08);
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  cursor: pointer;
}
.nw-card__img{
  min-height: 150px;
  border-bottom: 1px solid var(--nw-border);
  background: #fff;
}
.nw-card__img img{
  width: 100%;
  height: 150px;
  object-fit: cover;
  display: block;
}
.nw-card__body{
  padding: 12px;
}
.nw-card__title{
  margin: 0 0 8px;
  font-weight: 950;
  color: var(--nw-text);
}
.nw-card__excerpt{
  margin: 0;
  color: var(--nw-muted);
  line-height: 1.5;
}
.nw-card__meta{
  margin-top: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--nw-muted);
  font-weight: 850;
}

.nw-empty{
  margin-top: 12px;
  padding: 12px 14px;
  border: 1px solid var(--nw-border);
  border-radius: 14px;
  background: var(--nw-surface-2);
  color: var(--nw-muted);
}

/* Modal */
.nw-modal[hidden]{ display: none; }
.nw-modal{
  position: fixed;
  inset: 0;
  z-index: 1200;
}
.nw-modal__overlay{
  position: absolute;
  inset: 0;
  background: rgba(2, 6, 23, 0.55);
}
.nw-modal__dialog{
  position: relative;
  width: min(980px, calc(100% - 2 * var(--nw-gutter)));
  margin: 8vh auto 0;
  background: #fff;
  border: 1px solid var(--nw-border);
  border-radius: 16px;
  box-shadow: 0 26px 70px rgba(0,0,0,0.28);
  overflow: hidden;
}
.nw-modal__head{
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--nw-border);
  background: #fbfdff;
}
.nw-modal__kicker{
  color: var(--nw-muted);
  font-weight: 900;
  margin-bottom: 4px;
}
.nw-modal__title{
  font-weight: 950;
  font-size: 1.2rem;
  color: var(--nw-text);
}
.nw-modal__close{
  border: 1px solid var(--nw-border);
  background: #fff;
  border-radius: 10px;
  padding: 8px 10px;
  font-weight: 950;
  cursor: pointer;
  color: var(--nw-text);
}
.nw-modal__body{
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 0;
}
.nw-modal__img{
  border-right: 1px solid var(--nw-border);
  min-height: 320px;
}
.nw-modal__img img{
  width: 100%;
  height: 100%;
  min-height: 320px;
  object-fit: cover;
  display: block;
}
.nw-modal__content{
  padding: 16px;
  color: var(--nw-muted);
  line-height: 1.6;
}
.nw-modal__content p{ margin: 0 0 10px; }
.nw-modal__content p:last-child{ margin-bottom: 0; }

.nw-modal__foot{
  padding: 12px 16px 16px;
  border-top: 1px solid var(--nw-border);
  background: #fbfdff;
  display: flex;
  justify-content: flex-end;
}

/* focus */
.nw-btn:focus-visible,
.nw-card:focus-visible,
.nw-modal__close:focus-visible{
  outline: 3px solid var(--nw-focus);
  outline-offset: 2px;
  border-radius: 12px;
}

/* responsive */
@media (max-width: 1040px){
  .nw-hero__grid{ grid-template-columns: 1fr; }
  .nw-hero__media{ min-height: 220px; }
  .nw-featured__grid{ grid-template-columns: 1fr; }
  .nw-featured__img{ border-left: 0; border-top: 1px solid var(--nw-border); }
  .nw-grid{ grid-template-columns: 1fr; }
  .nw-modal__body{ grid-template-columns: 1fr; }
  .nw-modal__img{ border-right: 0; border-bottom: 1px solid var(--nw-border); }
}
