/* SoftWaterWise site shell. Article bodies carry their own scoped styles (.wsh, .wvf, ...). */
:root {
  --sw-blue: #0b5394;
  --sw-blue-dark: #083d6e;
  --sw-ink: #1f2328;
  --sw-muted: #57606a;
  --sw-line: #d8e2ec;
  --sw-soft: #f3f7fb;
  --sw-bg: #ffffff;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body { margin: 0; background: var(--sw-bg); color: var(--sw-ink); font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 16px; line-height: 1.6; }
a { color: var(--sw-blue); }
a:hover { color: var(--sw-blue-dark); }
img, svg { max-width: 100%; height: auto; }
:focus-visible { outline: 3px solid #f0b429; outline-offset: 2px; }

.sw-skip { position: absolute; left: -9999px; top: 8px; background: #fff; color: var(--sw-ink); padding: 8px 12px; border-radius: 6px; z-index: 20; }
.sw-skip:focus { left: 16px; }
.sw-wrap { max-width: 1080px; margin: 0 auto; padding: 0 16px; }

/* Header */
.sw-header { background: #fff; border-bottom: 1px solid var(--sw-line); }
.sw-header-in { display: flex; align-items: center; justify-content: space-between; gap: 8px 24px; min-height: 64px; flex-wrap: wrap; }
.sw-logo { display: inline-flex; align-items: center; gap: 10px; color: var(--sw-ink); text-decoration: none; font-weight: 800; font-size: 1.3rem; letter-spacing: -0.01em; }
.sw-logo b { color: var(--sw-blue); font-weight: 800; }
.sw-logo:hover { color: var(--sw-ink); }
.sw-drop { width: 30px; height: 30px; flex: 0 0 30px; }
.sw-nav { display: flex; gap: 4px 20px; flex-wrap: wrap; font-size: 0.95rem; }
.sw-nav a { color: var(--sw-ink); text-decoration: none; padding: 6px 0; }
.sw-nav a:hover { color: var(--sw-blue); text-decoration: underline; }

/* Article and page container */
.sw-main { max-width: 800px; margin: 0 auto; padding: 18px 16px 56px; }
.sw-crumbs { font-size: 0.85rem; color: var(--sw-muted); margin: 0 0 16px; }
.sw-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 2px 6px; }
.sw-crumbs li + li::before { content: "›"; margin-right: 6px; color: #8c959f; }
.sw-crumbs a { color: var(--sw-muted); }

.sw-page { font-size: 17px; line-height: 1.65; }
.sw-page h1 { font-size: 2em; line-height: 1.25; margin: 0 0 12px; }
.sw-page h2 { font-size: 1.4em; line-height: 1.3; margin: 36px 0 10px; }
.sw-page h3 { font-size: 1.15em; margin: 24px 0 6px; }
.sw-page ul, .sw-page ol { padding-left: 22px; }
.sw-page li { margin: 6px 0; }
.sw-lead { font-size: 1.12em; color: #33393f; }

/* Author box and related guides */
.sw-author { display: flex; gap: 16px; align-items: flex-start; background: var(--sw-soft); border: 1px solid var(--sw-line); border-radius: 12px; padding: 18px 20px; margin: 44px 0 0; font-size: 0.95rem; }
.sw-author p { margin: 0 0 8px; }
.sw-author-name { font-weight: 700; }
.sw-author-links { margin-bottom: 0 !important; }
.sw-avatar { flex: 0 0 48px; width: 48px; height: 48px; border-radius: 50%; background: var(--sw-blue); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; letter-spacing: 0.03em; }
.sw-avatar-lg { flex-basis: 72px; width: 72px; height: 72px; font-size: 1.5rem; }
.sw-profile { display: flex; gap: 18px; align-items: flex-start; }
.sw-profile .sw-lead { margin-top: 0; }
.sw-related { margin-top: 40px; }
.sw-related h2 { font-size: 1.3rem; margin: 0 0 12px; }

/* Cards */
.sw-cards { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.sw-card { margin: 0 !important; }
.sw-card a { display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 16px 18px; background: #fff; border: 1px solid var(--sw-line); border-radius: 12px; color: var(--sw-ink); text-decoration: none; transition: border-color .15s, box-shadow .15s; }
.sw-card a:hover { border-color: var(--sw-blue); box-shadow: 0 2px 10px rgba(11, 83, 148, 0.12); color: var(--sw-ink); }
.sw-card-title { font-weight: 700; color: var(--sw-blue); line-height: 1.3; }
.sw-card-desc { font-size: 0.9rem; color: var(--sw-muted); line-height: 1.5; }

/* Homepage */
.sw-hero { background: linear-gradient(180deg, #e8f1fa 0%, #f6f9fc 100%); border-bottom: 1px solid var(--sw-line); padding: 44px 0 40px; }
.sw-hero-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 40px; align-items: center; }
.sw-hero h1 { font-size: 2.4rem; line-height: 1.15; margin: 0 0 14px; letter-spacing: -0.015em; }
.sw-hero .sw-lead { margin: 0 0 18px; }
.sw-stats { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; }
.sw-stats span { background: #fff; border: 1px solid var(--sw-line); border-radius: 999px; padding: 5px 12px; font-size: 0.88rem; font-weight: 600; color: #33393f; }

/* Hero sizing calculator */
.swq { background: #fff; border: 1px solid var(--sw-line); border-radius: 14px; padding: 20px 22px; box-shadow: 0 6px 24px rgba(15, 39, 64, 0.08); }
.swq h2 { font-size: 1.2rem; margin: 0 0 14px; }
.swq-row { display: grid; grid-template-columns: 1fr 1.3fr; gap: 12px; }
.swq label { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: 0.92rem; }
.swq input, .swq select { font: inherit; font-size: 16px; font-weight: 400; color: var(--sw-ink); height: 44px; border: 1px solid #b9c7d6; border-radius: 8px; padding: 0 10px; background: #fff; width: 100%; min-width: 0; }
.swq-inline { display: flex; gap: 6px; }
.swq-inline select { width: auto; flex: 0 0 auto; }
.swq-hint { font-size: 0.85rem; color: var(--sw-muted); margin: 8px 0 12px; }
.swq-result { background: #eef5fc; border-left: 4px solid var(--sw-blue); border-radius: 8px; padding: 12px 16px; }
.swq-result p { margin: 0; }
.swq-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--sw-muted); font-weight: 700; }
.swq-big { font-size: 1.75rem; font-weight: 800; color: var(--sw-blue-dark); line-height: 1.2; margin: 2px 0 4px !important; }
.swq-note { font-size: 0.92rem; color: #33393f; }
.swq-foot { font-size: 0.85rem; color: var(--sw-muted); margin: 12px 0 0; }

/* Problem shortcuts */
.sw-problems { margin: 36px 0 0; }
.sw-problems h2, .sw-section-head h2, .sw-group h2 { font-size: 1.45rem; margin: 0 0 14px; }
.sw-chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.sw-chips a { display: inline-flex; align-items: center; gap: 6px; padding: 9px 15px; background: #fff; border: 1px solid var(--sw-line); border-radius: 999px; color: var(--sw-ink); text-decoration: none; font-weight: 600; font-size: 0.95rem; }
.sw-chips a::after { content: "→"; color: var(--sw-blue); }
.sw-chips a:hover { border-color: var(--sw-blue); color: var(--sw-blue-dark); }

/* Top picks */
.sw-picks { margin: 40px 0 0; }
.sw-section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 6px 16px; flex-wrap: wrap; }
.sw-section-head a { font-weight: 600; }
.sw-pick-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.sw-pick { display: flex; flex-direction: column; background: #fff; border: 1px solid var(--sw-line); border-radius: 12px; padding: 18px 20px; }
.sw-pick-label { align-self: flex-start; background: #e8f1fa; color: var(--sw-blue-dark); font-size: 0.8rem; font-weight: 700; border-radius: 999px; padding: 3px 10px; }
.sw-pick h3 { font-size: 1.15rem; line-height: 1.3; margin: 10px 0 6px; }
.sw-pick p { margin: 0 0 8px; color: #33393f; font-size: 0.95rem; }
.sw-pick ul { margin: 0 0 14px; padding-left: 18px; font-size: 0.9rem; color: var(--sw-muted); }
.sw-pick li { margin: 3px 0; }
.sw-buy { margin-top: auto; display: block; text-align: center; background: #1a7f37; color: #fff; text-decoration: none; font-weight: 700; border-radius: 8px; padding: 11px 16px; }
.sw-buy:hover { background: #156c2e; color: #fff; }
.sw-why { display: block; text-align: center; margin-top: 8px; font-size: 0.92rem; font-weight: 600; }
.sw-picks-note { font-size: 0.82rem; color: var(--sw-muted); margin: 10px 0 0; }

.sw-trust { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 18px; margin: 40px 0 8px; }
.sw-trust div { border-left: 4px solid var(--sw-blue); padding: 2px 0 2px 14px; }
.sw-trust h2 { font-size: 1.05rem; margin: 0 0 4px; }
.sw-trust p { margin: 0; color: var(--sw-muted); font-size: 0.95rem; }
.sw-group { margin: 40px 0 0; scroll-margin-top: 16px; }
.sw-more { margin-top: 14px; }
.sw-more summary { cursor: pointer; display: inline-block; font-weight: 700; color: var(--sw-blue); padding: 6px 0; list-style: none; }
.sw-more summary::-webkit-details-marker { display: none; }
.sw-more summary::after { content: " ▾"; }
.sw-more[open] summary { display: none; }
.sw-about-strip { margin: 48px 0 56px; padding: 20px 22px; background: var(--sw-soft); border: 1px solid var(--sw-line); border-radius: 12px; }
.sw-about-strip h2 { font-size: 1.2rem; margin: 0 0 6px; }
.sw-about-strip p { margin: 0; color: #33393f; }

/* Footer */
.sw-footer { background: #0f2740; color: #d5e2ef; padding: 36px 0 28px; font-size: 0.92rem; }
.sw-footer a { color: #fff; }
.sw-footer .sw-logo, .sw-footer .sw-logo:hover { color: #fff; }
.sw-footer .sw-logo b { color: #8ec5ff; }
.sw-foot-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 24px; }
.sw-foot-grid nav { display: flex; flex-direction: column; gap: 6px; }
.sw-foot-grid nav a { text-decoration: none; }
.sw-foot-grid nav a:hover { text-decoration: underline; }
.sw-foot-head { font-weight: 700; color: #fff; margin: 0 0 4px; }
.sw-foot-brand p { margin: 10px 0 0; max-width: 320px; }
.sw-legal { margin: 24px 0 0; color: #aac0d6; font-size: 0.85rem; max-width: 860px; }
.sw-legal + .sw-legal { margin-top: 8px; }

@media (max-width: 900px) {
  .sw-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 760px) {
  .sw-foot-grid { grid-template-columns: 1fr 1fr; }
  .sw-foot-brand { grid-column: 1 / -1; }
  .sw-hero { padding: 28px 0 28px; }
  .sw-hero h1 { font-size: 1.85rem; }
}
@media (max-width: 420px) {
  .swq { padding: 16px; }
  .swq-row { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .sw-header-in { padding-top: 10px; padding-bottom: 6px; }
  .sw-nav { width: 100%; flex-wrap: nowrap; overflow-x: auto; gap: 18px; padding-bottom: 6px; -webkit-overflow-scrolling: touch; }
  .sw-nav a { white-space: nowrap; }
  .sw-page h1 { font-size: 1.7em; }
  .sw-author, .sw-profile { flex-direction: column; gap: 10px; }
}
@media print {
  .sw-header, .sw-footer, .sw-related, .sw-skip { display: none; }
}
