:root {
  --bg: #202c29;
  --bg-2: #263633;
  --surface: rgba(35, 52, 49, 0.9);
  --surface-solid: #263633;
  --line: rgba(213, 230, 221, 0.24);
  --line-strong: rgba(215, 236, 116, 0.3);
  --text: #f8fbf2;
  --muted: #d2ded8;
  --soft: #edf6ef;
  --neon: #d5f56f;
  --cyan: #8ad7cf;
  --violet: #bd8cff;
  --amber: #f4d285;
  --danger: #ff6f91;
  --shadow: 0 18px 48px rgba(17, 27, 24, 0.26);
  --max: 940px;
  --radius: 8px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--text);
  background:
    linear-gradient(135deg, rgba(215, 236, 116, 0.09), transparent 28%),
    linear-gradient(215deg, rgba(138, 215, 207, 0.1), transparent 34%),
    linear-gradient(180deg, #2a3935 0%, #202c29 48%, #263633 100%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
  line-height: 1.6;
  letter-spacing: 0;
}

body::before {
  position: fixed;
  inset: 0;
  z-index: -2;
  content: "";
  background-image:
    linear-gradient(rgba(215, 236, 116, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(138, 215, 207, 0.032) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, rgba(0, 0, 0, 0.46), transparent 82%);
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

code {
  color: #f3ffd8;
  background: rgba(213, 245, 111, 0.1);
  border: 1px solid rgba(213, 245, 111, 0.18);
  border-radius: 6px;
  padding: 0.08rem 0.28rem;
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
}

strong {
  color: #ffffff;
}

.skip-link {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 20;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  background: var(--neon);
  color: #18231f;
  border-radius: 6px;
  font-weight: 800;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 10;
  border-bottom: 1px solid rgba(213, 245, 111, 0.14);
  background: rgba(31, 45, 42, 0.92);
  backdrop-filter: blur(18px);
}

.nav {
  width: min(100% - 32px, var(--max));
  min-height: 68px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: #ffffff;
  text-decoration: none;
  font-weight: 900;
}

.brand-mark {
  display: inline-grid;
  width: 42px;
  height: 42px;
  place-items: center;
  color: #18231f;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  border-radius: 8px;
  box-shadow: 0 0 18px rgba(213, 245, 111, 0.25);
  font-size: 0.9rem;
}

.brand-text {
  font-size: 1rem;
  letter-spacing: 0.06em;
}

.nav-links {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  flex: 1;
}

.nav-links a,
.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 1rem;
  transition: color 160ms ease, text-shadow 160ms ease;
}

.nav-links a:hover,
.footer-links a:hover {
  color: var(--neon);
  text-shadow: 0 0 14px rgba(213, 245, 111, 0.34);
}

.nav-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 0.65rem 1rem;
  color: #18231f;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  border-radius: 8px;
  text-decoration: none;
  font-weight: 800;
  box-shadow: 0 0 18px rgba(125, 224, 212, 0.22);
}

.hero {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(135deg, rgba(215, 236, 116, 0.12), transparent 36%),
    linear-gradient(215deg, rgba(138, 215, 207, 0.14), transparent 42%),
    #202c29;
}

.hero-media,
.hero-overlay {
  position: absolute;
  inset: 0;
}

.hero-media {
  display: none;
}

.hero-overlay {
  z-index: -2;
  background:
    linear-gradient(180deg, rgba(32, 44, 41, 0.2) 0%, #202c29 100%),
    linear-gradient(90deg, rgba(32, 44, 41, 0.94) 0%, rgba(32, 44, 41, 0.72) 100%);
}

.hero-content {
  width: min(100% - 32px, var(--max));
  min-height: 0;
  margin: 0 auto;
  padding: 64px 0 44px;
  display: grid;
  align-content: center;
  justify-items: start;
}

.arduino-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.2rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.07);
}

.arduino-badge img {
  width: 84px;
  height: auto;
}

.arduino-badge span {
  color: var(--soft);
  font-weight: 850;
}

.eyebrow,
.section-kicker {
  margin: 0 0 0.95rem;
  color: var(--neon);
  font-size: 0.9rem;
  font-weight: 900;
  letter-spacing: 0.11em;
  text-transform: uppercase;
  text-shadow: 0 0 12px rgba(213, 245, 111, 0.28);
}

.glow-title {
  margin: 0;
  color: #f7ffe8;
  font-size: 3.75rem;
  line-height: 1;
  letter-spacing: 0;
  text-shadow:
    0 0 5px rgba(213, 245, 111, 0.52),
    0 0 22px rgba(125, 224, 212, 0.18);
}

.hero-lead {
  width: 100%;
  margin: 1.55rem 0 0;
  color: var(--soft);
  font-size: 1.26rem;
  line-height: 1.72;
}

.hero-actions,
.link-panel,
.cta-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.8rem;
}

.hero-actions {
  margin-top: 2rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 46px;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 850;
  line-height: 1.2;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.button span {
  display: inline-grid;
  min-width: 28px;
  min-height: 28px;
  place-items: center;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 950;
}

.button:hover {
  transform: translateY(-2px);
}

.button-primary {
  color: #18231f;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  box-shadow: 0 0 18px rgba(213, 245, 111, 0.2);
}

.button-primary span {
  background: rgba(24, 35, 31, 0.14);
}

.button-secondary {
  color: #18231f;
  background: linear-gradient(135deg, var(--amber), #f5efa5);
  box-shadow: 0 0 22px rgba(255, 211, 110, 0.18);
}

.button-secondary span {
  background: rgba(24, 35, 31, 0.14);
}

.button-ghost {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.06);
}

.button-ghost span {
  color: var(--neon);
  background: rgba(213, 245, 111, 0.12);
}

.button-ghost:hover {
  border-color: var(--line-strong);
  box-shadow: 0 0 18px rgba(125, 224, 212, 0.14);
}

.lcd-preview {
  width: min(560px, 100%);
  margin-top: 2.1rem;
  padding: 1rem 1.1rem;
  border: 1px solid rgba(213, 245, 111, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(213, 245, 111, 0.15), rgba(125, 224, 212, 0.07)),
    rgba(36, 56, 43, 0.76);
  box-shadow:
    inset 0 0 22px rgba(213, 245, 111, 0.12),
    0 0 24px rgba(213, 245, 111, 0.1);
  font-family: "Courier New", Consolas, monospace;
}

.lcd-line {
  display: block;
  min-height: 1.45rem;
  color: #dfff6b;
  font-size: 1.2rem;
  font-weight: 800;
  text-shadow:
    0 0 5px rgba(223, 255, 107, 0.72),
    0 0 18px rgba(213, 245, 111, 0.28);
}

.lcd-line-dim {
  color: rgba(223, 255, 107, 0.78);
}

.signal-strip {
  width: min(100% - 32px, var(--max));
  margin: -18px auto 0;
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: rgba(35, 52, 49, 0.92);
  box-shadow: var(--shadow);
  backdrop-filter: blur(18px);
}

.signal-item {
  padding: 1.15rem;
  border-right: 1px solid var(--line);
}

.signal-item:last-child {
  border-right: 0;
}

.signal-item strong {
  display: block;
  color: var(--neon);
  font-size: 1.08rem;
  text-shadow: 0 0 12px rgba(213, 245, 111, 0.28);
}

.signal-item span {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 1rem;
}

.section {
  padding: 52px 0;
  border-bottom: 1px solid rgba(213, 230, 221, 0.18);
}

.section-inner {
  width: min(100% - 32px, var(--max));
  margin: 0 auto;
}

.readme-flow > * {
  margin-top: 0;
  margin-bottom: 0;
}

.readme-flow > * + * {
  margin-top: 1.05rem;
}

.readme-flow .gallery-grid,
.readme-flow .code-shell,
.readme-flow .readme-table,
.readme-flow .link-panel,
.readme-flow .cta-actions {
  margin-top: 1.45rem;
}

.readme-list {
  padding-left: 1.35rem;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.72;
}

.readme-list li + li {
  margin-top: 0.65rem;
}

.readme-table {
  width: 100%;
  border-collapse: collapse;
  color: var(--muted);
  font-size: 1.02rem;
}

.readme-table th,
.readme-table td {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.readme-table th {
  width: 34%;
  color: var(--text);
  font-weight: 850;
}

.two-column {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 3rem;
  align-items: start;
}

.intro {
  padding-top: 74px;
}

.section h2 {
  max-width: 860px;
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.2;
  letter-spacing: 0;
}

.section p {
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.72;
}

.intro-copy p:first-child {
  margin-top: 0;
}

.section-heading {
  display: grid;
  gap: 0.6rem;
  margin-bottom: 2rem;
}

.section-heading.compact {
  max-width: 850px;
}

.dark-band,
.faq-band {
  border-block: 0;
  background:
    linear-gradient(135deg, rgba(125, 224, 212, 0.07), transparent 42%),
    linear-gradient(225deg, rgba(189, 140, 255, 0.09), transparent 44%),
    rgba(36, 53, 50, 0.74);
}

.feature-grid,
.install-grid,
.gallery-grid,
.faq-grid {
  display: grid;
  gap: 1rem;
}

.feature-grid {
  grid-template-columns: repeat(2, 1fr);
}

.feature-card,
.install-step,
.api-item,
details,
.spec-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.085), rgba(255, 255, 255, 0.04));
  box-shadow: 0 18px 48px rgba(17, 27, 24, 0.14);
}

.feature-card {
  min-height: 0;
  padding: 1.45rem;
}

.feature-token,
.step-number {
  display: inline-grid;
  width: 36px;
  height: 32px;
  place-items: center;
  border-radius: 6px;
  color: #18231f;
  background: linear-gradient(135deg, var(--neon), var(--cyan));
  font-size: 0.76rem;
  font-weight: 950;
}

.feature-card h3,
.install-step h3 {
  margin: 1.2rem 0 0.55rem;
  font-size: 1.24rem;
  line-height: 1.28;
}

.feature-card p,
.install-step p,
details p {
  margin: 0;
  color: var(--muted);
}

.install-grid {
  grid-template-columns: repeat(3, 1fr);
}

.install-step {
  padding: 1.35rem;
}

.link-panel {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

.code-band {
  border-block: 0;
  background:
    linear-gradient(135deg, rgba(255, 211, 110, 0.09), transparent 38%),
    linear-gradient(225deg, rgba(125, 224, 212, 0.07), transparent 42%),
    #22302d;
}

.code-layout {
  align-items: center;
}

.usage-copy {
  max-width: 560px;
}

.code-shell {
  overflow: hidden;
  border: 1px solid rgba(255, 211, 110, 0.2);
  border-radius: 8px;
  background: #1d2a27;
  box-shadow: var(--shadow);
}

.code-toolbar {
  min-height: 52px;
  padding: 0.75rem 0.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  color: var(--amber);
  border-bottom: 1px solid rgba(255, 211, 110, 0.18);
  background: rgba(255, 211, 110, 0.06);
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.95rem;
}

.copy-button {
  min-height: 34px;
  padding: 0.35rem 0.7rem;
  color: #18231f;
  background: var(--amber);
  border: 0;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 900;
}

pre {
  margin: 0;
  overflow: auto;
  padding: 1rem;
  color: #ebfff7;
  font-size: 0.98rem;
  line-height: 1.55;
}

pre code {
  display: block;
  padding: 0;
  color: inherit;
  background: transparent;
  border: 0;
  border-radius: 0;
  font-size: inherit;
}

.gallery-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.gallery-section {
  padding-top: 64px;
}

figure {
  margin: 0;
  align-self: start;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
}

figure img {
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
}

figcaption {
  min-height: 0;
  padding: 0.55rem 0 0;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.5;
}

.hardware-layout {
  display: grid;
  grid-template-columns: 0.95fr 1.05fr;
  gap: 3rem;
  align-items: center;
}

.hardware-layout p {
  max-width: 620px;
}

.spec-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
}

.spec-item {
  padding: 1.2rem;
}

.spec-item span {
  display: block;
  color: var(--muted);
  font-size: 1rem;
}

.spec-item strong {
  display: block;
  margin-top: 0.3rem;
  color: var(--cyan);
  font-size: 1.24rem;
  text-shadow: 0 0 12px rgba(125, 224, 212, 0.18);
}

.api-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.9rem;
}

.api-item {
  padding: 1rem;
  display: grid;
  grid-template-columns: minmax(210px, 0.9fr) 1.1fr;
  gap: 1rem;
  align-items: center;
}

.api-item span {
  color: var(--muted);
  font-size: 1.02rem;
}

.faq-grid {
  grid-template-columns: repeat(2, 1fr);
}

details {
  padding: 1rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

summary {
  cursor: pointer;
  color: var(--text);
  font-weight: 850;
  font-size: 1.05rem;
}

details p {
  margin-top: 0.8rem;
}

.cta-section {
  background:
    linear-gradient(135deg, rgba(213, 245, 111, 0.08), transparent 34%),
    linear-gradient(225deg, rgba(255, 111, 145, 0.1), transparent 38%);
}

.cta-layout {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  padding: 2rem;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: rgba(35, 52, 49, 0.84);
  box-shadow: 0 0 26px rgba(213, 245, 111, 0.08);
}

.cta-layout h2 {
  max-width: 720px;
}

.cta-layout p {
  max-width: 660px;
}

.site-footer {
  border-top: 1px solid var(--line);
  background: #1d2926;
}

.footer-inner {
  width: min(100% - 32px, var(--max));
  min-height: 92px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.footer-inner p {
  margin: 0;
  color: var(--muted);
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

@media (max-width: 980px) {
  .nav {
    min-height: auto;
    padding: 0.85rem 0;
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .nav-links {
    order: 3;
    width: 100%;
    justify-content: flex-start;
    overflow-x: auto;
    padding-bottom: 0.25rem;
  }

  .glow-title {
    font-size: 3.1rem;
  }

  .hero-lead {
    font-size: 1.14rem;
  }

  .signal-strip,
  .install-grid,
  .gallery-grid,
  .api-list,
  .faq-grid,
  .spec-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .two-column,
  .hardware-layout {
    grid-template-columns: 1fr;
    gap: 2rem;
  }

  .section h2 {
    font-size: 1.9rem;
  }

  .api-item {
    grid-template-columns: 1fr;
  }

  .cta-layout,
  .footer-inner {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .site-header {
    position: static;
  }

  .nav-action {
    min-height: 38px;
  }

  .hero,
  .hero-content {
    min-height: 0;
  }

  .hero-content {
    padding: 58px 0 42px;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(32, 44, 41, 0.96) 0%, rgba(32, 44, 41, 0.78) 100%),
      linear-gradient(180deg, rgba(32, 44, 41, 0.16) 0%, #202c29 100%),
      linear-gradient(135deg, rgba(213, 245, 111, 0.1), transparent 40%);
  }

  .glow-title {
    font-size: 2.55rem;
  }

  .arduino-badge {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.45rem;
  }

  .hero-actions,
  .link-panel,
  .cta-actions {
    width: 100%;
  }

  .button {
    width: 100%;
  }

  .lcd-preview {
    padding: 0.85rem;
  }

  .lcd-line {
    font-size: 1rem;
  }

  .signal-strip,
  .feature-grid,
  .install-grid,
  .gallery-grid,
  .api-list,
  .faq-grid,
  .spec-grid {
    grid-template-columns: 1fr;
  }

  .signal-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .signal-item:last-child {
    border-bottom: 0;
  }

  .section {
    padding: 58px 0;
  }

  .intro {
    padding-top: 58px;
  }

  .section h2 {
    font-size: 1.55rem;
  }

  .section p {
    font-size: 1rem;
  }

  .readme-list {
    font-size: 1rem;
  }

  .readme-table,
  .readme-table tbody,
  .readme-table tr,
  .readme-table th,
  .readme-table td {
    display: block;
    width: 100%;
  }

  .readme-table th {
    padding-bottom: 0.25rem;
    border-bottom: 0;
  }

  .readme-table td {
    padding-top: 0;
  }

  pre {
    font-size: 0.82rem;
  }

  .code-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition: none !important;
    animation: none !important;
  }
}
