/* Water Quality Wire - utilitarian trade-journal stylesheet */

:root {
  --steel: #1d4e89;
  --steel-deep: #163c6b;
  --slate: #475569;
  --ink: #21303f;
  --pale: #eef4fb;
  --pale-row: #f7fafd;
  --line: #d7e1ee;
  --white: #ffffff;
  --serif: "IBM Plex Serif", Georgia, "Times New Roman", serif;
  --sans: "IBM Plex Sans", "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--white);
}

img, svg { max-width: 100%; }

a { color: var(--steel); }

a:focus-visible {
  outline: 2px solid var(--steel);
  outline-offset: 2px;
}

.wrap {
  max-width: 1080px;
  margin: 0 auto;
  padding-left: 20px;
  padding-right: 20px;
}

.sep { color: var(--line); padding: 0 4px; }

/* Top band */

.topband {
  background: var(--steel);
  color: var(--white);
  border-bottom: 4px solid var(--steel-deep);
}

.topband-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  padding-top: 20px;
  padding-bottom: 18px;
}

.brandmark {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--white);
}

.brandmark svg { width: 34px; height: 34px; flex: none; display: block; }

.wordmark {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.7rem;
  line-height: 1.1;
  letter-spacing: 0.01em;
}

.tagline {
  margin-left: auto;
  font-size: 0.78rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.16em;
  color: #c9daf0;
}

/* Main navigation */

.mainnav {
  background: var(--white);
  border-bottom: 2px solid var(--steel);
}

.mainnav ul {
  display: flex;
  gap: 2px;
  list-style: none;
  overflow-x: auto;
}

.mainnav a {
  display: block;
  padding: 11px 14px 8px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--slate);
  border-bottom: 3px solid transparent;
  white-space: nowrap;
}

.mainnav a:hover { color: var(--steel); }

.mainnav a[aria-current="page"] {
  color: var(--steel);
  border-bottom-color: var(--steel);
}

/* Homepage layout */

.layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 48px;
  padding-top: 34px;
  padding-bottom: 56px;
}

/* Lead story */

.lead-story {
  border-left: 6px solid var(--steel);
  padding: 4px 0 4px 22px;
  margin-bottom: 36px;
}

.kicker {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--steel);
}

.kicker a {
  color: var(--steel);
  text-decoration: none;
}

.kicker a:hover { text-decoration: underline; }

.lead-story h2 {
  font-family: var(--serif);
  font-size: 2.05rem;
  font-weight: 700;
  line-height: 1.18;
  margin: 8px 0 10px;
}

.lead-story h2 a { color: var(--ink); text-decoration: none; }

.lead-story h2 a:hover { color: var(--steel); }

.dek {
  color: var(--slate);
  font-size: 1.05rem;
  line-height: 1.55;
}

.meta {
  margin-top: 10px;
  font-size: 0.75rem;
  font-weight: 500;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* Latest headlines grid */

.block-title {
  font-family: var(--sans);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  border-bottom: 2px solid var(--steel);
  padding-bottom: 8px;
}

.headline-grid {
  list-style: none;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 40px;
}

.headline-grid li {
  padding: 15px 0 13px;
  border-bottom: 1px solid var(--line);
}

.tag {
  display: inline-block;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--steel);
  text-decoration: none;
}

.tag:hover { text-decoration: underline; }

.headline-grid h3 {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 5px 0 6px;
}

.headline-grid h3 a { color: var(--ink); text-decoration: none; }

.headline-grid h3 a:hover { color: var(--steel); }

.headline-grid time {
  font-size: 0.73rem;
  color: var(--slate);
  letter-spacing: 0.06em;
}

/* Sidebar panels */

.sidebar { min-width: 0; }

.panel {
  background: var(--pale);
  border: 1px solid var(--line);
  border-top: 3px solid var(--steel);
  padding: 20px 20px 16px;
  margin-bottom: 28px;
}

.panel h2 {
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--steel);
  margin-bottom: 10px;
}

.panel ul { list-style: none; }

.panel li {
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.88rem;
  line-height: 1.5;
}

.panel li:last-child { border-bottom: 0; }

.panel li a { color: var(--ink); text-decoration: none; }

.panel li a:hover { color: var(--steel); text-decoration: underline; }

.term {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 6px;
}

.def {
  font-size: 0.88rem;
  line-height: 1.55;
  color: var(--ink);
  margin-bottom: 10px;
}

.related {
  font-size: 0.82rem;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.related a { color: var(--steel); text-decoration: none; }

.related a:hover { text-decoration: underline; }

/* Section pages */

.section-wrap { padding-bottom: 56px; }

.section-head {
  border-left: 6px solid var(--steel);
  padding-left: 22px;
  margin: 36px 0 6px;
}

.section-head h1 {
  font-family: var(--serif);
  font-size: 1.95rem;
  font-weight: 700;
  line-height: 1.15;
}

.section-desc {
  color: var(--slate);
  margin-top: 6px;
  max-width: 64ch;
}

.section-list {
  list-style: none;
  margin-top: 14px;
}

.section-list li {
  padding: 22px 0 20px;
  border-bottom: 1px solid var(--line);
}

.item-meta {
  font-size: 0.73rem;
  font-weight: 500;
  color: var(--slate);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.section-list h2 {
  font-family: var(--serif);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 6px 0 6px;
}

.section-list h2 a { color: var(--ink); text-decoration: none; }

.section-list h2 a:hover { color: var(--steel); }

.section-list .dek { font-size: 0.95rem; }

/* Article pages */

.article-wrap {
  max-width: 780px;
  margin: 0 auto;
  padding: 38px 20px 60px;
}

.article h1 {
  font-family: var(--serif);
  font-size: 2.1rem;
  font-weight: 700;
  line-height: 1.16;
  margin: 10px 0 12px;
}

.article .dek { font-size: 1.1rem; }

.article .meta {
  padding-bottom: 16px;
  margin-top: 12px;
  margin-bottom: 26px;
  border-bottom: 2px solid var(--steel);
}

.article-body p { margin: 0 0 18px; }

.article-body h2 {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 600;
  line-height: 1.25;
  margin: 30px 0 12px;
  color: var(--steel-deep);
}

.article-body a {
  color: var(--steel);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.article-body ul, .article-body ol {
  margin: 0 0 18px 22px;
}

.article-body li { margin-bottom: 8px; }

.endmark {
  margin-top: 30px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: var(--steel);
}

.backlinks {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  font-size: 0.85rem;
}

.backlinks a { color: var(--steel); text-decoration: none; }

.backlinks a:hover { text-decoration: underline; }

/* Tables */

.table-scroll {
  overflow-x: auto;
  margin: 6px 0 22px;
  border: 1px solid var(--line);
}

table {
  width: 100%;
  min-width: 540px;
  border-collapse: collapse;
  font-size: 0.9rem;
  line-height: 1.5;
}

th {
  background: var(--pale);
  color: var(--steel-deep);
  font-weight: 600;
  text-align: left;
  padding: 10px 12px;
  border-bottom: 2px solid var(--steel);
}

td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tbody tr:nth-child(even) { background: var(--pale-row); }

tbody tr:last-child td { border-bottom: 0; }

/* Footer */

.sitefoot {
  background: var(--steel);
  color: #d5e3f5;
  border-top: 4px solid var(--steel-deep);
  margin-top: 24px;
}

.footgrid {
  display: grid;
  grid-template-columns: 2fr 1fr 1.2fr;
  gap: 40px;
  padding-top: 36px;
  padding-bottom: 40px;
  font-size: 0.85rem;
  line-height: 1.6;
}

.foot-brand {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--white);
  margin-bottom: 8px;
}

.foot-head {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #a9c4e4;
  margin-bottom: 10px;
}

.sitefoot ul { list-style: none; }

.sitefoot li { margin-bottom: 6px; }

.sitefoot a { color: var(--white); text-decoration: none; }

.sitefoot a:hover { text-decoration: underline; }

.foot-copy { margin-top: 12px; color: #a9c4e4; }

/* Responsive */

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; gap: 36px; }
  .headline-grid { grid-template-columns: 1fr; }
  .footgrid { grid-template-columns: 1fr; gap: 24px; }
  .tagline { margin-left: 0; flex-basis: 100%; }
  .lead-story h2 { font-size: 1.6rem; }
  .article h1 { font-size: 1.68rem; }
  .section-head h1 { font-size: 1.6rem; }
}

@media (max-width: 480px) {
  .wordmark { font-size: 1.35rem; }
  .brandmark svg { width: 28px; height: 28px; }
  .lead-story { padding-left: 16px; border-left-width: 5px; }
}
