/* ============================================================
   SepticSystemGuide.org
   Shared stylesheet for static HTML educational guide site
   Publisher: WRS Web Solutions Inc.
   ============================================================ */

:root {
  --color-ink: #223029;
  --color-muted: #5f6f66;
  --color-soft: #f6f1e6;
  --color-paper: #fffdf7;
  --color-card: #ffffff;
  --color-line: #ded4c2;

  --color-forest: #254f3c;
  --color-forest-dark: #18382a;
  --color-moss: #6f8b5c;
  --color-clay: #9a6a42;
  --color-sand: #d7bd88;
  --color-cream: #fbf7ed;
  --color-warning-soft: #fff4da;
  --color-warning-line: #e4c06e;

  --shadow-soft: 0 14px 36px rgba(34, 48, 41, 0.11);
  --shadow-card: 0 8px 24px rgba(34, 48, 41, 0.08);

  --radius-small: 0.55rem;
  --radius-medium: 1rem;
  --radius-large: 1.45rem;

  --container: 1180px;
  --container-wide: 1320px;
}

/* ------------------------------------------------------------
   Base
   ------------------------------------------------------------ */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background:
    radial-gradient(circle at top left, rgba(215, 189, 136, 0.22), transparent 34rem),
    linear-gradient(180deg, var(--color-cream), #ffffff 34rem);
  color: var(--color-ink);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
}

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

a {
  color: var(--color-forest);
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.18em;
}

a:hover,
a:focus {
  color: var(--color-clay);
}

p {
  margin: 0 0 1rem;
}

h1,
h2,
h3,
h4 {
  margin: 0 0 0.75rem;
  color: var(--color-forest-dark);
  line-height: 1.18;
}

h1 {
  font-size: clamp(2.15rem, 5vw, 4.35rem);
  letter-spacing: -0.045em;
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.45rem);
  letter-spacing: -0.028em;
  margin-top: 2.5rem;
}

h3 {
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  letter-spacing: -0.012em;
  margin-top: 1.75rem;
}

ul,
ol {
  padding-left: 1.35rem;
  margin: 0 0 1.1rem;
}

li + li {
  margin-top: 0.35rem;
}

strong {
  color: var(--color-forest-dark);
}

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.35rem 0;
  background: var(--color-card);
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  overflow: hidden;
}

th,
td {
  padding: 0.85rem 0.95rem;
  border-bottom: 1px solid var(--color-line);
  text-align: left;
  vertical-align: top;
}

th {
  background: #efe5d2;
  color: var(--color-forest-dark);
}

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

/* ------------------------------------------------------------
   Layout helpers
   ------------------------------------------------------------ */

.container {
  width: min(var(--container), calc(100% - 2rem));
  margin-inline: auto;
}

.container-wide {
  width: min(var(--container-wide), calc(100% - 2rem));
  margin-inline: auto;
}

.section {
  padding: clamp(2.5rem, 6vw, 5rem) 0;
}

.section-tight {
  padding: clamp(1.75rem, 4vw, 3rem) 0;
}

.lead {
  color: #43554b;
  font-size: clamp(1.08rem, 2vw, 1.28rem);
  line-height: 1.75;
}

.muted {
  color: var(--color-muted);
}

.small {
  font-size: 0.94rem;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  color: var(--color-clay);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 2px;
  background: var(--color-sand);
}

.skip-link {
  position: absolute;
  left: -999px;
  top: auto;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.skip-link:focus {
  left: 1rem;
  top: 1rem;
  z-index: 999;
  width: auto;
  height: auto;
  padding: 0.7rem 1rem;
  background: #ffffff;
  color: var(--color-forest-dark);
  border: 2px solid var(--color-forest);
  border-radius: var(--radius-small);
}

/* ------------------------------------------------------------
   Header and navigation
   ------------------------------------------------------------ */

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(255, 253, 247, 0.94);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(222, 212, 194, 0.9);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 0.85rem 0;
}

/* Header brand uses a square mark plus live text.
   This avoids the tiny-logo issue caused by wide SVG scaling. */
.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-forest-dark);
  text-decoration: none;
  min-width: 18rem;
  max-width: 30rem;
  flex: 0 0 auto;
}

.site-header .brand img.brand-mark {
  display: block;
  width: 64px;
  height: 64px;
  max-width: none;
  object-fit: contain;
  flex: 0 0 64px;
  border-radius: 18px;
  box-shadow: 0 8px 18px rgba(34, 48, 41, 0.16);
}

.brand-text {
  display: grid;
  gap: 0.12rem;
  line-height: 1.05;
}

.brand-text strong {
  display: block;
  color: var(--color-forest-dark);
  font-size: clamp(1.15rem, 2vw, 1.45rem);
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-text small {
  display: block;
  color: var(--color-muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.25rem;
  flex-wrap: wrap;
}

.site-nav a {
  display: inline-flex;
  align-items: center;
  min-height: 2.5rem;
  padding: 0.45rem 0.7rem;
  color: var(--color-ink);
  font-size: 0.95rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
}

.site-nav a:hover,
.site-nav a:focus,
.site-nav a[aria-current="page"] {
  background: #eadfc8;
  color: var(--color-forest-dark);
}

/* ------------------------------------------------------------
   Hero
   ------------------------------------------------------------ */

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 7vw, 6rem) 0;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -10rem -10rem auto;
  width: 32rem;
  height: 32rem;
  background: rgba(111, 139, 92, 0.14);
  border-radius: 50%;
  pointer-events: none;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, 0.85fr);
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-card {
  background:
    linear-gradient(145deg, rgba(37, 79, 60, 0.96), rgba(24, 56, 42, 0.98)),
    var(--color-forest-dark);
  color: #ffffff;
  padding: clamp(1.35rem, 3vw, 2.2rem);
  border-radius: var(--radius-large);
  box-shadow: var(--shadow-soft);
}

.hero-card h2,
.hero-card h3 {
  color: #ffffff;
}

.hero-card p {
  color: rgba(255, 255, 255, 0.84);
}

.hero-card a {
  color: #ffe7a6;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

/* ------------------------------------------------------------
   Buttons and link chips
   ------------------------------------------------------------ */

.button,
.button-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.85rem;
  padding: 0.7rem 1.05rem;
  border-radius: 999px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
}

.button {
  background: var(--color-forest);
  color: #ffffff;
  box-shadow: 0 10px 18px rgba(37, 79, 60, 0.18);
}

.button:hover,
.button:focus {
  background: var(--color-forest-dark);
  color: #ffffff;
}

.button-secondary {
  background: #efe5d2;
  color: var(--color-forest-dark);
}

.button-secondary:hover,
.button-secondary:focus {
  background: #e3d2b2;
  color: var(--color-forest-dark);
}

.chip-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin: 1.2rem 0 0;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 2.35rem;
  padding: 0.45rem 0.75rem;
  background: #f0e7d5;
  color: var(--color-forest-dark);
  border: 1px solid #dfcfad;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 750;
  text-decoration: none;
}

.chip:hover,
.chip:focus {
  background: #e5d4b5;
  color: var(--color-forest-dark);
}

/* ------------------------------------------------------------
   Cards and grids
   ------------------------------------------------------------ */

.card {
  background: var(--color-card);
  border: 1px solid rgba(222, 212, 194, 0.95);
  border-radius: var(--radius-large);
  padding: clamp(1.15rem, 2.4vw, 1.65rem);
  box-shadow: var(--shadow-card);
}

.card h2:first-child,
.card h3:first-child {
  margin-top: 0;
}

.card-link {
  color: inherit;
  text-decoration: none;
}

.card-link:hover h2,
.card-link:hover h3,
.card-link:focus h2,
.card-link:focus h3 {
  color: var(--color-clay);
}

.grid {
  display: grid;
  gap: 1rem;
}

.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.feature-card {
  position: relative;
  overflow: hidden;
  min-height: 100%;
}

.feature-card::before {
  content: "";
  display: block;
  width: 3.4rem;
  height: 0.25rem;
  margin-bottom: 1rem;
  background: linear-gradient(90deg, var(--color-moss), var(--color-sand));
  border-radius: 999px;
}

.article-list {
  display: grid;
  gap: 0.9rem;
}

.article-list a {
  display: block;
  padding: 1rem 1.1rem;
  background: #fffaf0;
  border: 1px solid var(--color-line);
  border-radius: var(--radius-medium);
  color: var(--color-forest-dark);
  font-weight: 800;
  text-decoration: none;
}

.article-list a:hover,
.article-list a:focus {
  background: #efe5d2;
  color: var(--color-forest-dark);
}

/* ------------------------------------------------------------
   Article pages
   ------------------------------------------------------------ */

.article-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: start;
}

.article-content {
  background: rgba(255, 253, 247, 0.82);
  border: 1px solid rgba(222, 212, 194, 0.8);
  border-radius: var(--radius-large);
  padding: clamp(1.25rem, 3vw, 2.4rem);
  box-shadow: var(--shadow-card);
}

.article-content h2 {
  padding-top: 0.2rem;
}

.article-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin: 1rem 0 1.35rem;
  color: var(--color-muted);
  font-size: 0.95rem;
}

.article-meta a {
  color: inherit;
  font-weight: 700;
}

.sidebar {
  position: sticky;
  top: 6.5rem;
}

.sidebar-card {
  background: #f6eddb;
  border: 1px solid #dfcfad;
  border-radius: var(--radius-large);
  padding: 1.15rem;
}

.sidebar-card + .sidebar-card {
  margin-top: 1rem;
}

.sidebar-card h2,
.sidebar-card h3 {
  margin-top: 0;
}

.sidebar-card ul {
  padding-left: 1rem;
  margin-bottom: 0;
}

.notice,
.safety-note,
.pro-note {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: var(--radius-medium);
}

.notice {
  background: #edf4e7;
  border: 1px solid #c9d9bb;
}

.safety-note {
  background: var(--color-warning-soft);
  border: 1px solid var(--color-warning-line);
}

.pro-note {
  background: #eef1ee;
  border: 1px solid #cfd8d0;
}

.notice p:last-child,
.safety-note p:last-child,
.pro-note p:last-child {
  margin-bottom: 0;
}

/* ------------------------------------------------------------
   Breadcrumbs
   ------------------------------------------------------------ */

.breadcrumbs {
  margin: 1.25rem 0 0;
  color: var(--color-muted);
  font-size: 0.94rem;
}

.breadcrumbs a {
  color: var(--color-muted);
  font-weight: 700;
  text-decoration: none;
}

.breadcrumbs a:hover,
.breadcrumbs a:focus {
  color: var(--color-clay);
  text-decoration: underline;
}

/* ------------------------------------------------------------
   Ads
   Real AdSense units can be placed inside these containers.
   Do not use fake visual ad placeholder text.
   ------------------------------------------------------------ */

.ad-container {
  margin: clamp(1.5rem, 4vw, 2.25rem) 0;
  min-height: 90px;
}

.ad-container ins.adsbygoogle {
  display: block;
}

/* ------------------------------------------------------------
   Footer
   ------------------------------------------------------------ */

.site-footer {
  margin-top: 4rem;
  padding: 3rem 0 2rem;
  background:
    linear-gradient(145deg, rgba(24, 56, 42, 0.98), rgba(37, 79, 60, 0.96)),
    var(--color-forest-dark);
  color: rgba(255, 255, 255, 0.84);
}

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.8fr) minmax(220px, 0.8fr);
  gap: 2rem;
}

.site-footer h2,
.site-footer h3 {
  color: #ffffff;
}

.site-footer a {
  color: #ffe6a5;
}

.site-footer ul {
  list-style: none;
  padding: 0;
}

.site-footer li + li {
  margin-top: 0.4rem;
}

.footer-bottom {
  margin-top: 2rem;
  padding-top: 1.2rem;
  border-top: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.92rem;
}

/* ------------------------------------------------------------
   Forms / simple contact-style blocks
   ------------------------------------------------------------ */

.help-box {
  background: #fff8e9;
  border: 1px solid #e3c985;
  border-radius: var(--radius-large);
  padding: clamp(1.15rem, 3vw, 1.75rem);
}

/* ------------------------------------------------------------
   Responsive
   ------------------------------------------------------------ */

@media (max-width: 980px) {
  body {
    font-size: 16.5px;
  }

  .header-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .brand {
    min-width: 0;
    max-width: 100%;
  }

  .site-header .brand img.brand-mark {
    width: 60px;
    height: 60px;
    flex-basis: 60px;
  }

  .brand-text strong {
    font-size: 1.25rem;
  }

  .brand-text small {
    font-size: 0.76rem;
  }

  .site-nav {
    justify-content: flex-start;
  }

  .hero-grid,
  .article-layout,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
  }

  .grid-3,
  .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px) {
  .container,
  .container-wide {
    width: min(100% - 1rem, var(--container));
  }

  .site-nav {
    gap: 0.2rem;
  }

  .site-nav a {
    min-height: 2.25rem;
    padding: 0.35rem 0.55rem;
    font-size: 0.9rem;
  }

  .brand {
    gap: 0.6rem;
    min-width: 0;
    max-width: 100%;
  }

  .site-header .brand img.brand-mark {
    width: 56px;
    height: 56px;
    flex-basis: 56px;
    border-radius: 16px;
  }

  .brand-text strong {
    font-size: 1.15rem;
  }

  .brand-text small {
    font-size: 0.72rem;
  }

  .hero {
    padding-top: 2.35rem;
  }

  .grid-2,
  .grid-3,
  .grid-4 {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 0.75rem;
  }

  .article-content {
    padding: 1.1rem;
  }
}

@media (max-width: 420px) {
  .site-header .brand img.brand-mark {
    width: 52px;
    height: 52px;
    flex-basis: 52px;
  }

  .brand-text strong {
    font-size: 1.05rem;
  }

  .brand-text small {
    font-size: 0.68rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}