/* Undersite site: shared tokens, header, footer, buttons, theme switch and the legal pages. */

@font-face {
  font-family: 'Instrument Sans';
  font-weight: 400;
  font-display: swap;
  src: url('fonts/instrument-sans-latin-400-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 500;
  font-display: swap;
  src: url('fonts/instrument-sans-latin-500-normal.woff2') format('woff2');
}
@font-face {
  font-family: 'Instrument Sans';
  font-weight: 600;
  font-display: swap;
  src: url('fonts/instrument-sans-latin-600-normal.woff2') format('woff2');
}

:root {
  --surface: #ffffff;
  --surface-2: #f2f2ef;
  --ink: #101820;
  --ink-2: #5b6670;
  --line: #e3e4e1;
  --orange: #ff5b1f;
  --on-orange: #101820;
  --issue: #d92d20;
  --power: #d6302a;
  --telecom: #f08a00;
  --water: #1f6fc4;
  --sewer: #2e8b3d;
  --gas: #e3b600;
  --soil: #f7f7f5;
  --shadow: 0 1px 2px rgb(16 24 32 / 6%), 0 12px 40px rgb(16 24 32 / 10%);
  --band: #101820;
  --band-ink: #f5f6f4;
  --band-ink-2: #9aa5ad;
  --band-line: #2b3742;
  --band-field: #18232c;
  --sans: 'Instrument Sans', 'Helvetica Neue', Arial, sans-serif;
  --wrap: 1180px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --surface: #101820;
    --surface-2: #18232c;
    --ink: #f5f6f4;
    --ink-2: #9aa5ad;
    --line: #2b3742;
    --issue: #ff6b5e;
    --power: #f0524a;
    --telecom: #ffa033;
    --water: #5aa3f0;
    --sewer: #4fb862;
    --gas: #f2cf3a;
    --soil: #141e27;
    --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 48px rgb(0 0 0 / 40%);
    --band: #0a1016;
    --band-field: #141e27;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --surface: #101820;
  --surface-2: #18232c;
  --ink: #f5f6f4;
  --ink-2: #9aa5ad;
  --line: #2b3742;
  --issue: #ff6b5e;
  --power: #f0524a;
  --telecom: #ffa033;
  --water: #5aa3f0;
  --sewer: #4fb862;
  --gas: #f2cf3a;
  --soil: #141e27;
  --shadow: 0 1px 2px rgb(0 0 0 / 30%), 0 16px 48px rgb(0 0 0 / 40%);
  --band: #0a1016;
  --band-field: #141e27;
  color-scheme: dark;
}

/* Pictures made in each look: the one that fits is shown (over any display set elsewhere). */
.in-dark {
  display: none !important;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .in-dark {
    display: block !important;
  }
  :root:not([data-theme='light']) .in-light {
    display: none !important;
  }
}
:root[data-theme='dark'] .in-dark {
  display: block !important;
}
:root[data-theme='dark'] .in-light {
  display: none !important;
}

* {
  box-sizing: border-box;
}
html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  font: 400 17px/1.55 var(--sans);
}
a {
  color: inherit;
}
img {
  max-width: 100%;
}
:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 3px;
  border-radius: 4px;
}
h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  text-wrap: balance;
}
h2 {
  font-size: clamp(30px, 3.6vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.025em;
}
h3 {
  font-size: 18px;
  line-height: 1.35;
  letter-spacing: -0.01em;
}
p {
  margin: 0;
}
.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
}
.muted {
  color: var(--ink-2);
}
.icon {
  width: 20px;
  height: 20px;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* Header */
.top-bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent;
}
.top-bar.is-scrolled {
  border-bottom-color: var(--line);
}
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}
.top .home img {
  display: block;
  height: 26px;
  width: auto;
}
.top nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 15px;
}
.top nav a {
  text-decoration: none;
  color: var(--ink-2);
}
.top nav a:hover {
  color: var(--ink);
}
.top .tools {
  display: flex;
  align-items: center;
  gap: 10px;
}
.theme {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink);
  cursor: pointer;
}
.theme:hover {
  background: var(--surface-2);
}
.theme .moon {
  display: none;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) .theme .moon {
    display: block;
  }
  :root:not([data-theme='light']) .theme .sun {
    display: none;
  }
}
:root[data-theme='dark'] .theme .moon {
  display: block;
}
:root[data-theme='dark'] .theme .sun {
  display: none;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--orange);
  color: var(--on-orange);
  font: 500 16px/1 var(--sans);
  text-decoration: none;
  padding: 15px 22px;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgb(255 91 31 / 28%);
}
.btn.small {
  padding: 11px 16px;
  font-size: 15px;
}
.btn.ghost {
  background: transparent;
  color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line);
}
.btn.ghost:hover {
  background: var(--surface-2);
  box-shadow: inset 0 0 0 1px var(--line);
}

/* Footer */
.foot {
  border-top: 1px solid var(--line);
  margin-top: 0;
}
.foot .wrap {
  padding-block: 40px 48px;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 16px 32px;
  font-size: 14px;
  color: var(--ink-2);
}
.foot img {
  display: block;
  height: 22px;
  width: auto;
}
.foot nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.foot a {
  text-decoration: none;
}
.foot a:hover {
  color: var(--ink);
}

/* Legal pages */
.doc {
  padding-block: 56px 96px;
  max-width: 760px;
}
.doc .kicker {
  font-size: 14px;
  color: var(--ink-2);
  margin-bottom: 12px;
}
.doc h1 {
  font-size: clamp(36px, 5vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.doc .lead {
  margin-top: 18px;
  font-size: 19px;
  color: var(--ink-2);
}
.doc h2 {
  margin-top: 48px;
  font-size: 24px;
  letter-spacing: -0.015em;
}
.doc h3 {
  margin-top: 28px;
}
.doc p,
.doc ul,
.doc ol {
  margin: 14px 0 0;
}
.doc li + li {
  margin-top: 6px;
}
.doc table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 18px;
  font-size: 15px;
}
.doc th,
.doc td {
  text-align: left;
  vertical-align: top;
  padding: 12px 12px 12px 0;
  border-bottom: 1px solid var(--line);
}
.doc th {
  font-weight: 600;
}
.doc .tablewrap {
  overflow-x: auto;
}
.doc .note {
  margin-top: 28px;
  padding: 18px 20px;
  background: var(--surface-2);
  border-radius: 8px;
  font-size: 15px;
}

@media (max-width: 980px) {
  .top nav a:not(.keep) {
    display: none;
  }
}
@media (max-width: 640px) {
  .wrap {
    padding-left: max(16px, env(safe-area-inset-left, 0px));
    padding-right: max(16px, env(safe-area-inset-right, 0px));
  }
  .top .btn.small {
    display: none;
  }
}
