:root {
  --navy: #054166;
  --navy-2: #054166;
  --sky: #69B3E3;
  --orange: #F37021;
  --ink: #142230;
  --muted: #586978;
  --line: #d9e4eb;
  --soft: #f5f8fa;
  --white: #ffffff;
  --max: 1040px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--soft);
  font-family: Inter, Roboto, Arial, Helvetica, sans-serif;
  font-size: 15px;
  line-height: 1.42;
}

.wrap {
  width: min(calc(100% - 34px), var(--max));
  margin: 0 auto;
}

.page { padding: 24px 0 20px; }

a {
  color: var(--navy-2);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}
a:hover,
a:focus-visible { color: var(--orange); }

code {
  display: inline-block;
  padding: 1px 5px;
  border: 1px solid #cbdbe5;
  border-radius: 4px;
  background: #f4f8fa;
  color: #0c2c42;
  font-family: Consolas, Menlo, Monaco, "Courier New", monospace;
  font-size: 0.9em;
  line-height: 1.25;
  white-space: nowrap;
}

.intro-panel,
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(5, 43, 63, 0.045);
}

.intro-panel {
  padding: 18px 20px 16px;
  border-top: 5px solid var(--navy);
}

.logo {
  display: block;
  width: 238px;
  max-width: 74vw;
  height: auto;
  margin: 0 0 14px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--orange);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  line-height: 1.2;
  text-transform: uppercase;
}

h1,
h2,
h3,
p { margin-top: 0; }

h1 {
  margin: 0;
  color: var(--navy);
  font-size: clamp(2.1rem, 5vw, 3.25rem);
  line-height: 0.95;
  letter-spacing: -0.055em;
}

.intro-copy {
  max-width: none;
}

p { margin-bottom: 8px; }
p:last-child { margin-bottom: 0; }

.panel {
  margin-top: 14px;
  padding: 16px 18px 18px;
}

.section-head {
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 10px;
}

.section-head-plain {
  display: block;
}

.section-head h2 {
  margin: -2px 0 4px;
  color: var(--navy);
  font-size: 1.45rem;
  line-height: 1.1;
  letter-spacing: -0.025em;
}

.section-head h2 {
  display: flex;
  align-items: center;
  gap: 9px;
}

.section-head h2::before {
  content: "";
  display: inline-block;
  width: 4px;
  height: 0.95em;
  border-radius: 999px;
  background: var(--orange);
  flex: 0 0 auto;
}

.section-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}

.locations-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

table {
  width: 100%;
  min-width: 610px;
  border-collapse: collapse;
}

th,
td {
  padding: 7px 10px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

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

th {
  color: #103247;
  background: #f2f7fa;
  font-weight: 800;
}

tbody th {
  width: 190px;
}

.locations-grid table {
  min-width: 0;
}

.locations-grid td:first-child {
  width: 44%;
}

thead th {
  width: auto;
  color: #123044;
  font-size: 0.74rem;
  letter-spacing: 0.065em;
  text-transform: uppercase;
}

.subsection {
  margin-top: 14px;
}

.subsection:first-of-type { margin-top: 12px; }

.subsection h3 {
  margin: 0 0 7px;
  padding-left: 10px;
  border-left: 4px solid var(--sky);
  color: var(--navy);
  font-size: 1rem;
  line-height: 1.2;
}


/* Keep BGP community tables visually aligned across all sections. */
.community-table {
  table-layout: fixed;
}

.community-table th:first-child,
.community-table td:first-child {
  width: 190px;
}

.community-table th:last-child,
.community-table td:last-child {
  width: auto;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  justify-content: space-between;
  margin-top: 16px;
  padding: 12px 4px 0;
  color: var(--muted);
  font-size: 0.84rem;
}

.footer a { color: var(--navy-2); }

@media (max-width: 760px) {
  .intro-header { gap: 8px; }
  .logo { width: 180px; max-width: 70vw; }
  .header-sep { display: none; }
  .page { padding-top: 14px; }
  .intro-panel,
  .panel { border-radius: 11px; }
  .intro-panel { padding: 15px; }
  .panel { padding: 14px; }
  .logo { width: 214px; }
  .section-head {
    display: block;
  }
  .section-head h2 { margin-top: 2px; }
  .locations-grid { grid-template-columns: 1fr; }
  .locations-grid table { min-width: 0; }
  table { min-width: 560px; }
  .locations-grid table { min-width: 0; }
  th, td { padding: 7px 9px; }
  .footer { display: block; }
  .footer span { display: block; margin-bottom: 4px; }
}


.title-row{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:18px;
  margin-bottom:10px;
}
.logo-link{
  flex:0 0 auto;
  display:block;
}
.logo-link:hover,
.logo-link:focus-visible{
  opacity:.9;
}
.logo{
  flex:0 0 auto;
  width:210px;
  margin:0;
}
.title-text{
  display:flex;
  align-items:baseline;
  justify-content:flex-end;
  gap:10px;
  margin-left:auto;
  color:var(--navy);
  text-align:right;
  white-space:nowrap;
}
.title-row h1{
  margin:0;
  font-size:1.7rem;
  line-height:1;
}
.title-label{
  color:var(--navy);
  font-weight:800;
  font-size:1.7rem;
  line-height:1;
  letter-spacing:-0.025em;
}
.title-sep{
  color:var(--sky);
  font-weight:700;
}
@media (max-width:760px){
  .title-row{
    gap:8px;
    align-items:flex-start;
    flex-direction:column;
  }
  .logo{
    width:180px;
  }
  .title-text{
    justify-content:flex-start;
    margin-left:0;
    text-align:left;
    white-space:normal;
  }
  .title-row h1,
  .title-label{
    font-size:1.35rem;
  }
}

/* v15: Option C top treatment — logo/title on plain page with a thin rule, no top card. */
.intro-panel {
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0 2px 2px;
}

.title-row {
  margin-bottom: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.intro-copy {
  padding: 0;
}

.intro-copy p {
  margin-bottom: 7px;
}

@media (max-width: 760px) {
  .intro-panel {
    padding: 0 1px 2px;
  }

  .title-row {
    padding-bottom: 10px;
  }
}

/* v18: mobile-only wrapping and stacking fixes. Desktop layout remains unchanged. */
@media (max-width: 640px) {
  html,
  body {
    overflow-x: hidden;
  }

  .wrap {
    width: calc(100% - 24px);
  }

  .page {
    padding: 12px 0 16px;
  }

  .title-row {
    gap: 8px;
  }

  .title-text {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 8px;
    max-width: 100%;
    white-space: normal;
  }

  .title-row h1,
  .title-label {
    font-size: 1.28rem;
    line-height: 1.1;
  }

  .title-label,
  .intro-copy,
  .panel,
  .footer {
    overflow-wrap: anywhere;
  }

  .intro-copy p {
    margin-bottom: 8px;
  }

  .panel {
    margin-top: 12px;
    padding: 13px 12px 14px;
  }

  .section-head h2 {
    font-size: 1.28rem;
  }

  .section-head h2::before {
    width: 3px;
    height: 0.9em;
  }

  .table-wrap {
    max-width: 100%;
    overflow-x: visible;
  }

  table,
  .community-table {
    width: 100%;
    min-width: 0;
    table-layout: auto;
  }

  th,
  td {
    padding: 7px 8px;
    overflow-wrap: anywhere;
  }

  code {
    max-width: 100%;
    white-space: normal;
    overflow-wrap: anywhere;
  }

  /* Network information: stack label above value on small screens. */
  #network table,
  #network tbody,
  #network tr,
  #network th,
  #network td {
    display: block;
    width: 100%;
  }

  #network tr {
    padding: 7px 0;
    border-bottom: 1px solid var(--line);
  }

  #network tr:last-child {
    border-bottom: 0;
  }

  #network th,
  #network td {
    border-bottom: 0;
    padding: 2px 8px;
  }

  #network th {
    background: transparent;
    color: var(--muted);
    font-size: 0.72rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  /* Peering locations: keep city and IX together, but allow long IX names to wrap. */
  .locations-grid {
    gap: 8px;
  }

  .locations-grid tr {
    display: grid;
    grid-template-columns: minmax(108px, 42%) minmax(0, 1fr);
  }

  .locations-grid td:first-child {
    width: auto;
  }

  .locations-grid td {
    min-width: 0;
  }

  /* BGP communities: convert each row to a compact mobile record. */
  .community-table thead {
    display: none;
  }

  .community-table,
  .community-table tbody,
  .community-table tr,
  .community-table td {
    display: block;
    width: 100% !important;
  }

  .community-table tr {
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .community-table tr:last-child {
    border-bottom: 0;
  }

  .community-table td {
    border-bottom: 0;
    padding: 2px 8px;
  }

  .community-table td:first-child {
    padding-bottom: 4px;
  }

  .subsection {
    margin-top: 13px;
  }

  .subsection h3 {
    padding-left: 8px;
  }
}
