/* WaterFlow Support Site
   Field-guide aesthetic. No third-party dependencies.
   Last updated: 2026-06-11 */

:root {
  --bg: #fdfcfb;
  --surface: #ffffff;
  --text: #1c2330;
  --text-muted: #4a5468;
  --accent: #0078b8;
  --accent-hover: #005a8b;
  --border: #e8e6e1;
  --shadow: 0 1px 2px rgba(28, 35, 48, 0.04);
  --max-prose: 38em;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0f1620;
    --surface: #161e2c;
    --text: #e8e6e1;
    --text-muted: #9aa3b5;
    --accent: #4cb3e8;
    --accent-hover: #79c8ed;
    --border: #2a3344;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: var(--accent);
  color: white;
  padding: 0.5rem 1rem;
  text-decoration: none;
  z-index: 100;
}

.skip-link:focus { top: 0; }

header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1rem;
  background: var(--surface);
}

header.site-header .inner {
  max-width: var(--max-prose);
  margin: 0 auto;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  flex-wrap: wrap;
}

header.site-header .wordmark {
  font-size: 1.05rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
  text-decoration: none;
}

header.site-header .wordmark .droplet {
  color: var(--accent);
  margin-right: 0.15em;
}

header.site-header nav {
  margin-left: auto;
  font-size: 0.95rem;
}

header.site-header nav a {
  color: var(--text-muted);
  text-decoration: none;
  margin-left: 1.25rem;
}

header.site-header nav a:hover,
header.site-header nav a:focus {
  color: var(--accent);
  text-decoration: underline;
}

main {
  max-width: var(--max-prose);
  margin: 2rem auto 4rem;
  padding: 0 1rem;
}

h1 {
  font-size: 1.85rem;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 0.5rem 0 0.25rem;
}

h2 {
  font-size: 1.25rem;
  line-height: 1.3;
  font-weight: 600;
  margin-top: 2.5rem;
  margin-bottom: 0.5rem;
  padding-bottom: 0.35rem;
  border-bottom: 1px solid var(--border);
}

h3 {
  font-size: 1.05rem;
  font-weight: 600;
  margin-top: 1.75rem;
  margin-bottom: 0.4rem;
}

.lede {
  font-size: 1.08rem;
  color: var(--text-muted);
  margin-top: 0;
  margin-bottom: 1.5rem;
}

p { margin: 0.85rem 0; }

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

a:hover, a:focus {
  color: var(--accent-hover);
  text-decoration-thickness: 0.12em;
}

ul, ol { padding-left: 1.4rem; }
li { margin: 0.35rem 0; }

code {
  font-family: ui-monospace, SFMono-Regular, "SF Mono", Consolas, monospace;
  font-size: 0.9em;
  background: var(--border);
  padding: 0.1em 0.35em;
  border-radius: 3px;
}

.email-cta {
  display: inline-block;
  margin: 0.5rem 0 1rem;
  padding: 0.7rem 1.1rem;
  background: var(--accent);
  color: white;
  text-decoration: none;
  border-radius: 4px;
  font-weight: 500;
  font-size: 1.02rem;
  box-shadow: var(--shadow);
  transition: background 0.15s ease;
}

.email-cta:hover, .email-cta:focus {
  background: var(--accent-hover);
  color: white;
  text-decoration: none;
}

.email-cta::before {
  content: "✉ ";
  margin-right: 0.4em;
  opacity: 0.95;
}

.callout {
  background: var(--surface);
  border-left: 3px solid var(--accent);
  padding: 1rem 1.2rem;
  margin: 1.5rem 0;
  border-radius: 0 4px 4px 0;
  box-shadow: var(--shadow);
}

.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.25rem 0;
  font-size: 0.95rem;
}

th, td {
  text-align: left;
  padding: 0.55rem 0.6rem;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

th {
  font-weight: 600;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 1rem 2.5rem;
  color: var(--text-muted);
  font-size: 0.85rem;
  text-align: center;
  background: var(--surface);
}

footer.site-footer p { margin: 0.3rem 0; }

footer.site-footer a {
  color: var(--text-muted);
  text-decoration: underline;
}

footer.site-footer a:hover,
footer.site-footer a:focus {
  color: var(--accent);
}

/* Subtle focus rings for keyboard users */
a:focus-visible,
button:focus-visible,
.email-cta:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 2px;
}

/* Print: drop chrome, drop colors */
@media print {
  header.site-header nav,
  .email-cta,
  .skip-link { display: none; }
  main { max-width: none; }
  body { color: black; background: white; }
  a { color: black; text-decoration: underline; }
  .callout {
    background: white;
    border: 1px solid #ccc;
    border-left: 3px solid #333;
  }
}

/* Mobile tweaks */
@media (max-width: 480px) {
  html { font-size: 16px; }
  h1 { font-size: 1.6rem; }
  h2 { font-size: 1.15rem; }
  header.site-header nav a { margin-left: 0.85rem; }
  main { margin-top: 1.25rem; margin-bottom: 2rem; }
}
