/* Editorial guides: index and article layout on Ambiente's dark surface. */
.service-page.guides-page {
  --wrap: 88rem;
}
.guides-page main.wrap {
  padding-left: max(24px, env(safe-area-inset-left));
  padding-right: max(24px, env(safe-area-inset-right));
  padding-top: calc(var(--nav) + 56px);
  padding-bottom: clamp(64px, 9vw, 128px);
}

/* ---------- Index (/guias) ---------- */
.guides-header {
  max-width: 48rem;
  padding-bottom: clamp(36px, 5vw, 56px);
}
.guides-header h1 {
  font-size: clamp(38px, 5.2vw, 64px);
  letter-spacing: -.035em;
  line-height: 1.04;
}
.guides-header .lead {
  margin-top: 18px;
  max-width: 40rem;
  font-size: clamp(17px, 1.5vw, 20px);
  line-height: 1.55;
  color: var(--sand-dim);
}

.guides-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--sand-faint);
}
.guide-row {
  border-bottom: 1px solid var(--sand-faint);
}
.guide-row-link {
  display: grid;
  grid-template-columns: 180px minmax(0, 1fr) auto;
  gap: 16px clamp(24px, 4vw, 56px);
  align-items: baseline;
  padding: clamp(26px, 3.6vw, 40px) 0;
  text-decoration: none;
  color: inherit;
  transition: padding-left .25s cubic-bezier(.2, .7, .2, 1);
}
.guide-row-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 500 12.5px/1.4 "IBM Plex Mono", ui-monospace, monospace;
  color: var(--sand-dim);
  font-variant-numeric: tabular-nums;
}
.guide-row-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  margin-top: 6px;
}
.guide-row-tag {
  padding: 1px 7px;
  border: 1px solid var(--sand-faint);
  border-radius: 3px;
  font-size: 11px;
  letter-spacing: 0.02em;
  color: var(--sand);
  transition: border-color 0.2s, color 0.2s;
}
.guide-row-link:hover .guide-row-tag,
.guide-row-link:focus-visible .guide-row-tag {
  border-color: var(--sand-dim);
}
.guide-row-body {
  min-width: 0;
  max-width: 62rem;
}
.guide-row-body h2 {
  font-size: clamp(22px, 2.5vw, 31px);
  letter-spacing: -.025em;
  line-height: 1.18;
  color: var(--sand);
  transition: color .2s ease;
}
.guide-row-body p {
  margin-top: 10px;
  font-size: 16px;
  line-height: 1.5;
  color: var(--sand-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}
.guide-row-arrow {
  align-self: center;
  font-size: 20px;
  color: #76b7fa;
  transition: transform .25s cubic-bezier(.2, .8, .2, 1);
}
.guide-row-link:is(:hover, :focus-visible) {
  padding-left: 10px;
}
.guide-row-link:is(:hover, :focus-visible) h2 {
  color: #fff;
}
.guide-row-link:is(:hover, :focus-visible) .guide-row-arrow {
  transform: translateX(6px);
}

/* ---------- Article (/guias/...) ---------- */
.guide-crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  margin-bottom: 26px;
  font-size: 13.5px;
  color: var(--sand-dim);
}
.guide-crumbs a {
  color: var(--sand-dim);
  text-decoration: none;
  transition: color .2s;
}
.guide-crumbs a:hover {
  color: var(--sand);
  text-decoration: underline;
}
.guide-crumbs [aria-current="page"] {
  color: var(--sand);
}

.guide-article-head {
  max-width: 68rem;
  padding-bottom: clamp(32px, 4.5vw, 52px);
  border-bottom: 1px solid var(--sand-faint);
}
.guide-article-head h1 {
  font-size: clamp(32px, 4.4vw, 56px);
  letter-spacing: -.035em;
  line-height: 1.06;
  max-width: 30ch;
}
.guide-article-head .lead {
  margin-top: 20px;
  max-width: 76ch;
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.55;
  color: var(--sand-dim);
}
.guide-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin-top: 24px;
  font: 500 12.5px/1.4 "IBM Plex Mono", ui-monospace, monospace;
  color: var(--sand-dim);
  font-variant-numeric: tabular-nums;
}

.guide-byline {
  flex-basis: 100%;
}

.guide-layout {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(36px, 5vw, 72px);
  align-items: start;
  padding-top: clamp(36px, 5vw, 60px);
}

.guide-toc {
  position: sticky;
  top: calc(var(--nav) + 28px);
  font-size: 13.5px;
}
.guide-toc-title {
  margin: 0 0 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--sand);
}
.guide-toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-left: 1px solid var(--sand-faint);
}
.guide-toc li + li {
  margin-top: 2px;
}
.guide-toc a {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 8px;
  padding: 7px 0 7px 14px;
  margin-left: -1px;
  border-left: 2px solid transparent;
  color: var(--sand-dim);
  text-decoration: none;
  line-height: 1.35;
  transition: color .2s, border-color .2s;
}
.guide-toc a span {
  font: 500 11px/1.6 "IBM Plex Mono", ui-monospace, monospace;
  color: rgb(239 231 218 / .45);
}
.guide-toc a:hover,
.guide-toc a.active {
  color: var(--sand);
  border-left-color: var(--prisma);
}
.guide-toc a.active span {
  color: #76b7fa;
}

.guide-prose {
  min-width: 0;
  font-size: 17.5px;
  line-height: 1.68;
  color: rgb(239 231 218 / .9);
}
.guide-prose section {
  padding-block: 0 44px;
  margin-bottom: 44px;
  border-bottom: 1px solid var(--sand-faint);
  scroll-margin-top: calc(var(--nav) + 28px);
}
.guide-prose section:last-of-type {
  margin-bottom: 32px;
}
.guide-prose h2 {
  margin: 0 0 18px;
  font-size: clamp(23px, 2.6vw, 31px);
  letter-spacing: -.025em;
  line-height: 1.18;
  color: var(--sand);
}
.guide-prose h3 {
  margin: 28px 0 10px;
  font-size: clamp(18px, 1.9vw, 21px);
  letter-spacing: -.015em;
  line-height: 1.28;
  color: var(--sand);
}
/* Running text keeps a readable measure; tables and widgets use the whole column. */
.guide-prose :is(p, ul, ol, h2, h3) {
  max-width: 82ch;
}
.guide-prose p + p {
  margin-top: 16px;
}
.guide-prose ul,
.guide-prose ol {
  margin: 16px 0;
  padding-left: 22px;
  color: rgb(239 231 218 / .86);
}
.guide-prose li + li {
  margin-top: 8px;
}
.guide-prose strong {
  color: var(--sand);
  font-weight: 600;
}
.guide-prose a {
  color: #76b7fa;
  text-decoration: underline;
  text-decoration-color: rgb(118 183 250 / .45);
  text-underline-offset: 4px;
  transition: color .2s, text-decoration-color .2s;
}
.guide-prose a:hover {
  color: #94caff;
  text-decoration-color: currentColor;
}
.guide-prose code {
  padding: 2px 6px;
  border-radius: 4px;
  background: rgb(239 231 218 / .09);
  border: 1px solid rgb(239 231 218 / .12);
  font: 500 .88em/1.3 "IBM Plex Mono", ui-monospace, monospace;
  color: var(--sand);
}

/* ---------- Command blocks ---------- */
.cmd-block {
  margin: 18px 0;
  border: 1px solid rgb(239 231 218 / .16);
  border-radius: 6px;
  background: #141310;
  overflow: hidden;
}
.cmd-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 14px;
  border-bottom: 1px solid rgb(239 231 218 / .1);
  font: 500 12px/1.3 "IBM Plex Mono", ui-monospace, monospace;
  color: var(--sand-dim);
}
.cmd-copy {
  padding: 3px 9px;
  border: 1px solid rgb(239 231 218 / .2);
  border-radius: 999px;
  background: none;
  color: var(--sand-dim);
  font: 500 11.5px/1.2 "IBM Plex Mono", ui-monospace, monospace;
  cursor: pointer;
  transition: color .2s, border-color .2s;
}
.cmd-copy:hover {
  color: var(--sand);
  border-color: var(--sand);
}
.cmd-block pre {
  margin: 0;
  padding: 13px 14px;
  overflow-x: auto;
  font: 500 13.5px/1.55 "IBM Plex Mono", ui-monospace, monospace;
  color: var(--sand);
}
.cmd-block pre code {
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
}

/* ---------- Table of fields ---------- */
.guide-table-wrap {
  margin: 22px 0;
  overflow-x: auto;
  border: 1px solid rgb(239 231 218 / .16);
  border-radius: 6px;
  background: #141310;
}
.guide-table {
  width: 100%;
  min-width: 560px;
  border-collapse: collapse;
  font-size: 14.5px;
  line-height: 1.5;
}
.guide-table th,
.guide-table td {
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid rgb(239 231 218 / .1);
}
.guide-table tr:last-child td {
  border-bottom: 0;
}
.guide-table th {
  background: rgb(239 231 218 / .05);
  color: var(--sand);
  font-weight: 600;
  font-size: 13px;
}
.guide-table td:first-child {
  min-width: 9rem;
  font-weight: 600;
  color: var(--sand);
}
.guide-table td + td {
  min-width: 11rem;
}
.guide-table--codes td:nth-child(2) {
  font: 500 13px/1.5 "IBM Plex Mono", ui-monospace, monospace;
  color: #94caff;
}

/* ---------- Product piece: device record from the panel ---------- */
.asset-card {
  margin: 26px 0;
  border-radius: 8px;
  background: #f4f1ea;
  color: #1f2329;
  box-shadow: 0 28px 70px -32px rgb(0 0 0 / .8);
  overflow: hidden;
  font-size: 13.5px;
  line-height: 1.45;
  transition: transform .3s cubic-bezier(.2, .8, .2, 1), box-shadow .3s ease;
}
.asset-card:is(:hover, :focus-within) {
  transform: translateY(-2px);
  box-shadow: 0 34px 80px -28px rgb(0 0 0 / .9), 0 0 0 1px rgb(43 138 240 / .35);
}
.asset-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 16px;
  background: #e9e4da;
  border-bottom: 1px solid #ddd6ca;
  font-size: 12.5px;
  color: #5c6570;
}
.asset-card-top strong {
  color: #1f2329;
  font-weight: 600;
}
.asset-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 2px 9px;
  border-radius: 999px;
  background: #d8ead9;
  color: #24572a;
  font-size: 12px;
  font-weight: 600;
}
.asset-status::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #24572a;
}
.asset-card-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 16px 18px 14px;
}
.asset-card-title {
  margin: 0;
  font: 700 18px/1.2 "IBM Plex Mono", ui-monospace, monospace;
  color: #1561b8;
  letter-spacing: -.01em;
}
.asset-card-sub {
  margin: 4px 0 0;
  color: #5c6570;
  font-size: 13.5px;
}
.asset-sticker {
  position: relative;
  width: 148px;
  padding: 8px 10px;
  background: #fff;
  border: 1px solid #d5ceC0;
  border-radius: 4px;
  overflow: hidden;
  transition: border-color .25s ease, transform .25s ease;
}
.asset-card:is(:hover, :focus-within) .asset-sticker {
  border-color: #2b8af0;
  transform: rotate(-1deg);
}
.asset-sticker-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
  font-size: 10px;
  font-weight: 600;
  color: #1f2329;
}
.asset-sticker-brand img {
  width: 15px;
  height: auto;
}
.asset-sticker-bars {
  height: 24px;
  margin-top: 5px;
  background: repeating-linear-gradient(
    90deg,
    #1f2329 0 2px,
    transparent 2px 3px,
    #1f2329 3px 4px,
    transparent 4px 7px,
    #1f2329 7px 10px,
    transparent 10px 11px
  );
}
.asset-sticker-code {
  margin-top: 3px;
  text-align: center;
  font: 600 10px/1.1 "IBM Plex Mono", ui-monospace, monospace;
  letter-spacing: .08em;
  color: #3b424a;
}
.asset-sticker::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 10%;
  height: 2px;
  background: #e5322d;
  box-shadow: 0 0 8px 1px rgb(229 50 45 / .55);
  opacity: 0;
  pointer-events: none;
}
.asset-card:is(:hover, :focus-within) .asset-sticker::after {
  animation: asset-scan 1.3s ease-in-out 1;
}
@keyframes asset-scan {
  0% { top: 8%; opacity: 1; }
  50% { top: 90%; opacity: 1; }
  100% { top: 8%; opacity: 0; }
}
.asset-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0;
  border-top: 1px solid #ddd6ca;
}
.asset-grid > div {
  padding: 11px 16px;
  border-right: 1px solid #ddd6ca;
  border-bottom: 1px solid #ddd6ca;
  min-width: 0;
  transition: background-color .2s ease;
}
.asset-grid > div:nth-child(3n) {
  border-right: 0;
}
.asset-grid > div:hover {
  background: #ece7dd;
}
.asset-grid dt {
  font-size: 11.5px;
  color: #66707b;
}
.asset-grid dd {
  margin: 2px 0 0;
  font-weight: 600;
  color: #1f2329;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}
.asset-grid code {
  padding: 0;
  border: 0;
  background: none;
  color: #1f2329;
  font: 600 12.5px "IBM Plex Mono", ui-monospace, monospace;
}
.asset-warranty-bar {
  height: 4px;
  margin-top: 6px;
  border-radius: 2px;
  background: #ddd6ca;
  overflow: hidden;
}
.asset-warranty-bar i {
  display: block;
  height: 100%;
  width: 68%;
  background: #2b8af0;
  transform-origin: left;
  transition: transform .5s cubic-bezier(.2, .7, .2, 1), background-color .25s ease;
}
.asset-card:is(:hover, :focus-within) .asset-warranty-bar i {
  background: #1561b8;
  transform: scaleX(1.04);
}
.asset-card-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 16px;
  padding: 10px 16px;
  background: #ece7dd;
  font: 500 12px/1.4 "IBM Plex Mono", ui-monospace, monospace;
  color: #5c6570;
}

.guide-back {
  margin-top: 32px;
  font-size: 15px;
}
.guide-back a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sand);
  text-decoration: none;
  font-weight: 500;
}
.guide-back a span {
  transition: transform .2s ease;
}
.guide-back a:hover span {
  transform: translateX(-4px);
}

/* ---------- Responsive ---------- */
@media (max-width: 920px) {
  .guide-layout {
    grid-template-columns: 1fr;
    gap: 32px;
  }
  .guide-toc {
    position: static;
    padding: 16px 18px;
    border: 1px solid var(--sand-faint);
    border-radius: 6px;
    background: rgb(239 231 218 / .03);
  }
  .guide-toc ol {
    border-left: 0;
    columns: 2;
    column-gap: 20px;
  }
  .guide-toc li {
    break-inside: avoid;
  }
  .guide-toc a {
    padding: 5px 0;
    border-left: 0;
  }
}

@media (max-width: 640px) {
  .guide-row-link {
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
  }
  .guide-row-meta {
    grid-column: 1 / -1;
    flex-direction: row;
    gap: 12px;
  }
  .guide-toc ol {
    columns: 1;
  }
  .asset-card-head {
    grid-template-columns: 1fr;
  }
  .asset-grid {
    grid-template-columns: 1fr 1fr;
  }
  .asset-grid > div {
    border-right: 1px solid #ddd6ca;
  }
  .asset-grid > div:nth-child(2n) {
    border-right: 0;
  }
}

@media (max-width: 420px) {
  .asset-grid {
    grid-template-columns: 1fr;
  }
  .asset-grid > div {
    border-right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .guides-page *,
  .guides-page *::before,
  .guides-page *::after {
    animation: none !important;
    transition: none !important;
  }
}
