/* Fiberwave Internet — Terms & Policies
   Layout modeled on getsimplifiber.com/legal/
   Brand colors and type from fiberwaveinternet.com (Source Sans Pro, logo blues)
*/

:root {
  --fw-blue: #036cb7;
  --fw-blue-dark: #025a99;
  --fw-sky: #23a9e1;
  --fw-hero: #4696e5;
  --fw-ink: #2e3338;
  --fw-muted: #5c6570;
  --fw-line: #d2d7dc;
  --fw-wash: #f5f8fb;
  --fw-white: #ffffff;
  --fw-footer: #1c3348;
  --fw-placeholder-bg: #fff8e8;
  --fw-placeholder-border: #e0b84e;
  --fw-placeholder-ink: #6a4b00;
  --header-height: 4.5rem;
  --max: 72rem;
  --font: "Source Sans Pro", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

html,
body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--fw-ink);
  background: var(--fw-white);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

img {
  max-width: 100%;
  height: auto;
  border: 0;
}

a {
  color: var(--fw-blue);
  text-decoration: none;
}

a:hover {
  color: var(--fw-blue-dark);
  text-decoration: underline;
}

a:focus-visible,
button:focus-visible,
select:focus-visible {
  outline: 3px solid var(--fw-sky);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--fw-blue);
  color: var(--fw-white);
  padding: 0.5rem 1rem;
  z-index: 1000;
}

.skip-link:focus {
  left: 0.5rem;
  top: 0.5rem;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Topbar — modeled on SimpliFiber, Fiberwave contacts */
.topbar {
  background: var(--fw-blue-dark);
  color: var(--fw-white);
  font-size: 0.875rem;
}

.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  min-height: 2.25rem;
  align-items: center;
}

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

.topbar a:hover {
  text-decoration: underline;
  color: var(--fw-white);
}

/* Header */
.site-header {
  background: var(--fw-white);
  border-bottom: 1px solid var(--fw-line);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 1rem;
}

.logo {
  display: flex;
  align-items: center;
}

.logo img {
  height: 3rem;
  width: auto;
  display: block;
}

.header-home {
  font-weight: 600;
  font-size: 0.9375rem;
  color: var(--fw-blue);
  letter-spacing: 0.02em;
}

.header-home:hover {
  color: var(--fw-blue-dark);
  text-decoration: none;
}

/* Page title banner — same role as SimpliFiber #page-title */
.page-title {
  background-color: var(--fw-hero);
  background-image:
    linear-gradient(135deg, rgba(3, 108, 183, 0.55), rgba(70, 150, 229, 0.35)),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.18) 0, rgba(255, 255, 255, 0) 40%),
    linear-gradient(180deg, var(--fw-blue) 0%, var(--fw-hero) 100%);
  color: var(--fw-white);
  padding: 2.75rem 0;
}

.page-title h1 {
  margin: 0;
  font-size: 2.15rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.2;
  color: var(--fw-white);
}

/* Main layout: sidebar + content */
.page-content {
  flex: 1;
  padding: 2.5rem 0 4rem;
  background: var(--fw-white);
}

.layout {
  display: grid;
  grid-template-columns: 16.5rem minmax(0, 1fr);
  gap: 2.5rem;
  align-items: start;
}

.sidebar {
  position: sticky;
  top: calc(var(--header-height) + 1.25rem);
}

.sidebar nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--fw-line);
}

.sidebar nav li {
  margin: 0;
  border-bottom: 1px solid var(--fw-line);
}

.sidebar nav a {
  display: block;
  padding: 0.7rem 0.85rem 0.7rem 0.9rem;
  color: var(--fw-ink);
  text-decoration: none;
  font-size: 0.9375rem;
  font-weight: 400;
  border-left: 3px solid transparent;
}

.sidebar nav a:hover {
  color: var(--fw-blue);
  background: var(--fw-wash);
  text-decoration: none;
}

.sidebar nav a.is-active,
.sidebar nav a[aria-current="page"] {
  color: var(--fw-blue);
  font-weight: 600;
  border-left-color: var(--fw-blue);
  background: var(--fw-wash);
}

.policy-select-wrap {
  display: none;
  font-weight: 600;
  font-size: 0.875rem;
  margin-bottom: 0.4rem;
}

.policy-select {
  display: none;
  width: 100%;
  font-family: var(--font);
  font-size: 1rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--fw-line);
  border-radius: 0.35rem;
  background: var(--fw-white);
  color: var(--fw-ink);
  margin-bottom: 1.25rem;
}

/* Policy article typography — modeled on SimpliFiber post-item */
.panel[hidden] {
  display: none;
}

.policy-title {
  margin: 0 0 0.35rem;
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  color: var(--fw-ink);
  letter-spacing: -0.02em;
}

.policy-meta {
  color: var(--fw-muted);
  font-size: 0.875rem;
  margin: 0 0 1.5rem;
}

.panel,
.policy-body h3,
.policy-body h4 {
  scroll-margin-top: calc(var(--header-height) + 0.75rem);
}

.policy-body h3,
.policy-body h4 {
  margin: 1.75rem 0 0.55rem;
  font-size: 1.2rem;
  font-weight: 600;
  line-height: 1.3;
  color: var(--fw-ink);
}

.policy-body h3:first-child,
.policy-body h4:first-child {
  margin-top: 0;
}

.policy-body p {
  margin: 0 0 1rem;
}

.policy-body p:last-child {
  margin-bottom: 0;
}

/* Legal home */
.home-lead {
  color: var(--fw-muted);
  margin: 0 0 1.5rem;
}

.policy-index {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.65rem;
}

.policy-index a {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: baseline;
  padding: 0.85rem 1rem;
  border: 1px solid var(--fw-line);
  border-radius: 0.4rem;
  text-decoration: none;
  color: var(--fw-ink);
  background: var(--fw-white);
}

.policy-index a:hover {
  border-color: var(--fw-sky);
  background: var(--fw-wash);
  text-decoration: none;
}

.policy-index .idx-name {
  font-weight: 600;
  color: var(--fw-blue);
}

.policy-index .idx-status {
  font-size: 0.8125rem;
  color: var(--fw-muted);
  white-space: nowrap;
}

.policy-index .idx-status.is-missing {
  color: #8a6d1b;
}

/* Placeholder for policies Fiberwave does not publish */
.placeholder {
  background: var(--fw-placeholder-bg);
  border: 1px solid var(--fw-placeholder-border);
  border-left-width: 4px;
  border-radius: 0.35rem;
  padding: 1rem 1.15rem;
  color: var(--fw-ink);
}

.placeholder-label {
  margin: 0 0 0.5rem;
  font-weight: 700;
  color: var(--fw-placeholder-ink);
  font-size: 0.9375rem;
}

.placeholder p {
  margin: 0 0 0.75rem;
}

.placeholder p:last-child {
  margin-bottom: 0;
}

.related-note {
  margin-top: 1.25rem;
  padding-top: 1.15rem;
  border-top: 1px solid var(--fw-line);
  color: var(--fw-muted);
  font-size: 0.9375rem;
}

/* Footer — inverted, SimpliFiber-style, Fiberwave contacts */
.site-footer {
  background: var(--fw-footer);
  color: #d5dee6;
  margin-top: auto;
}

.footer-main {
  padding: 2.5rem 0 1.75rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 2rem;
  align-items: start;
}

.footer-logo img {
  height: 2.5rem;
  width: auto;
  display: block;
}

.footer-contact h2 {
  margin: 0 0 0.5rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--fw-white);
}

.footer-contact p {
  margin: 0;
}

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

.site-footer a:hover {
  color: var(--fw-white);
}

.footer-copy {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding: 1rem 0 1.25rem;
  font-size: 0.875rem;
  color: #9aa8b4;
}

.footer-copy .container {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.25rem;
  justify-content: center;
  text-align: center;
}

.footer-copy a {
  color: #c5d0d8;
}

/* Responsive */
@media screen and (max-width: 900px) {
  .layout {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .sidebar {
    position: static;
  }

  .sidebar nav {
    display: none;
  }

  .policy-select-wrap,
  .policy-select {
    display: block;
  }

  .page-title {
    padding: 1.75rem 0;
  }

  .page-title h1,
  .policy-title {
    font-size: 1.65rem;
  }

  .footer-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media screen and (max-width: 600px) {
  .logo img {
    height: 2.35rem;
  }

  .page-title h1 {
    font-size: 1.4rem;
  }

  .topbar .container {
    min-height: auto;
    padding-top: 0.4rem;
    padding-bottom: 0.4rem;
  }
}

.policy-body ul,
.policy-body ol {
  margin: 0 0 1rem 1.35rem;
  padding: 0;
}

.policy-body li {
  margin: 0 0 0.4rem;
}

.policy-body ul ul,
.policy-body ol ol,
.policy-body ul ol,
.policy-body ol ul {
  margin: 0.4rem 0 0.5rem 1.15rem;
}

.address-flag {
  display: inline;
  background: var(--fw-placeholder-bg);
  border: 1px solid var(--fw-placeholder-border);
  border-radius: 0.2rem;
  padding: 0.05rem 0.35rem;
  color: var(--fw-placeholder-ink);
  font-weight: 600;
}

/* Keep long address flags readable when they wrap */
.policy-body li .address-flag {
  display: inline-block;
}
