/* Device-page layout and introduction. */
.devices-page {
  padding-top: 44px;
  padding-bottom: 64px;
}

.devices-intro {
  max-width: 960px;
  margin-bottom: 52px;
}

.devices-intro h1 {
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.13;
  letter-spacing: -0.04em;
  margin: 28px 0 24px;
}

.devices-intro > p {
  max-width: 820px;
  font-size: 21px;
  line-height: 1.6;
  color: var(--muted);
}

/* Device links remain underlined.
   Shared site-sections.css owns their color, geometry, and alignment. */
.devices-page a {
  text-decoration-line: underline;
}

.back-link {
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:14px;
  line-height:1.5;
}
.devices-page a.back-link,.devices-page a.back-link:hover {text-decoration:none}
.back-link>span {text-decoration-line:underline;text-decoration-thickness:1px;text-underline-offset:4px}
.back-link>svg {flex:none}

/* Requirements and specification rows. */
.device-section {
  margin-top: 44px;
}

.device-section h2 {
  font-size: 30px;
  line-height: 1.25;
  letter-spacing: -0.025em;
  margin-bottom: 24px;
}

.device-specs {
  margin: 0;
}

.device-specs > div {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 2.4fr;
  gap: 28px;
  padding: 17px 0;
  border-top: 1px solid var(--line);
  line-height: 1.55;
}

.device-specs dt {
  font-weight: 600;
  font-size: 17px;
}

.device-specs dd {
  margin: 0;
  color: var(--muted);
  font-size: 17px;
}

.device-note {
  color: var(--muted);
  font-size: 15px;
  line-height: 1.6;
  margin-top: 18px;
  max-width: 850px;
}

/* Supported-device card and source links. */
.device-card {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 30px;
}

.device-card-heading {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}

.device-card h3 {
  font-size: 30px;
  line-height: 1.2;
  letter-spacing: -0.025em;
}

.device-stage {
  font-size: 14px;
  line-height: 1.5;
  background: #edf5fa;
  color: var(--navy);
  border-radius: 6px;
  padding: 7px 11px;
}

.device-description {
  color: var(--muted);
  font-size: 18px;
  line-height: 1.6;
  max-width: 820px;
  margin: 18px 0 26px;
}

.device-sources {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 24px;
  align-items: baseline;
  margin-top: 24px;
  font-size: 15px;
  line-height: 1.6;
}

.device-sources p {
  color: var(--muted);
}

/* OpenWrt references and notices. */
.devices-openwrt {
  max-width: 850px;
}

.devices-openwrt p {
  font-size: 18px;
  line-height: 1.6;
  color: var(--muted);
  margin-top: 16px;
}

.devices-page .project-notices {
  margin-top: 44px;
}

/* Stack specification rows and source links on small screens. */
@media (max-width: 700px) {
  .devices-page {
    padding-top: 30px;
    padding-bottom: 44px;
  }

  .devices-intro {
    margin-bottom: 34px;
  }

  .devices-intro h1 {
    font-size: 36px;
    margin-top: 22px;
  }

  .devices-intro > p {
    font-size: 18px;
  }

  .device-section {
    margin-top: 34px;
  }

  .device-section h2 {
    font-size: 26px;
  }

  .device-specs > div {
    grid-template-columns: 1fr;
    gap: 6px;
    padding: 14px 0;
  }

  .device-specs dt, .device-specs dd {
    font-size: 16px;
  }

  .device-card {
    padding: 20px;
  }

  .device-card h3 {
    font-size: 26px;
  }

  .device-description, .devices-openwrt p {
    font-size: 17px;
  }

  .device-sources {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .device-stage {
    max-width: 100%;
  }
}

/* Narrow phones. */
@media (max-width: 380px) {
  .devices-intro h1 {
    font-size: 31px;
  }

  .device-card {
    padding: 16px;
  }

  .device-card h3 {
    font-size: 24px;
  }
}
