/* /guides/ (2026-11-03): article template for guides and the hub. Scoped to g* classes; site.css tokens only.
   Every image is a real Oprivo capture (src/lib/guide.mjs). */

/* ------------------------------------------------------------------ hero */
.gh { position: relative; isolation: isolate; overflow: clip; background: var(--navy-950); color: var(--on-dark-2); padding: clamp(40px, 6vw, 84px) 0 clamp(56px, 7vw, 104px); }
.gh__bg { position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(720px 420px at 78% 38%, rgba(62, 207, 91, .16), transparent 70%), radial-gradient(520px 300px at 8% 0%, rgba(62, 207, 91, .07), transparent 70%), linear-gradient(180deg, var(--navy) 0%, var(--navy-950) 100%); }
.gh__bg::after { content: ""; position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px); background-size: 56px 56px; mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%); -webkit-mask-image: radial-gradient(ellipse at 70% 40%, #000 0%, transparent 70%); }
.gh__in { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(32px, 5vw, 72px); align-items: center; }
.gh .crumbs { flex-wrap: wrap; row-gap: 4px; }
.gh h1 { color: #fff; font-size: clamp(34px, 4.2vw, 54px); line-height: 1.05; letter-spacing: -.035em; max-width: 19ch; }
.gh__lead { margin-top: 22px; max-width: 56ch; font-size: clamp(17px, 1.45vw, 19.5px); line-height: 1.6; color: var(--on-dark-2); }
.gh__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 28px; }
.gh__meta span { display: inline-flex; align-items: center; gap: .3em; height: 30px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid rgba(255, 255, 255, .1); background: rgba(255, 255, 255, .035); font-size: 13.5px; color: var(--on-dark-2); }
.gh__meta span:first-child { border-color: rgba(62, 207, 91, .35); color: #c9f3d3; }
.gh--hub { padding-bottom: clamp(40px, 5vw, 64px); }
.gh--hub .gh__in { grid-template-columns: minmax(0, 1fr); }
.gh--hub h1 { max-width: 20ch; }

/* hero art: desk screen in perspective, a real card and a phone layered in front */
.gh__art { position: relative; min-height: 420px; perspective: 1600px; }
.gh__art figure { margin: 0; }
.gh__desk { position: relative; width: 100%; border-radius: 14px; overflow: hidden; background: #fff; transform: rotateY(-14deg) rotateX(4deg) translateX(4%); transform-origin: 60% 50%; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 40px 90px -30px rgba(0, 0, 0, .85), 0 0 120px -30px rgba(62, 207, 91, .35); }
.gh__chrome { display: flex; gap: 6px; align-items: center; height: 26px; padding: 0 12px; background: linear-gradient(#f9fbfd, #eef2f6); border-bottom: 1px solid var(--line); }
.gh__chrome span { width: 8px; height: 8px; border-radius: 50%; background: #d9e0e8; }
.gh__desk img { width: 100%; }
.gh__card { position: absolute; left: -6%; bottom: -8%; width: 54%; border-radius: 14px; overflow: hidden; background: #fff; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 30px 60px -20px rgba(0, 0, 0, .75); }
.gh__card img { max-height: 300px; object-fit: cover; object-position: top left; }
.gh__art--nodesk .gh__card img { max-height: none; }
.gh__phone { position: absolute; right: -2%; bottom: -12%; width: 30%; max-width: 230px; padding: 7px; border-radius: 30px; background: linear-gradient(160deg, #24324d, #090f1b 60%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 34px 70px -24px rgba(0, 0, 0, .9), 0 0 60px -20px rgba(62, 207, 91, .45); }
.gh__phone img { width: 100%; border-radius: 24px; aspect-ratio: 390 / 680; object-fit: cover; object-position: top; }
/* no desk: card is the hero object, phone in front of it */
.gh__art--nodesk { display: grid; place-items: center; min-height: 460px; }
.gh__art--nodesk .gh__card { position: relative; left: auto; bottom: auto; width: min(88%, 440px); transform: rotateY(-10deg) rotateX(4deg); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1), 0 40px 90px -30px rgba(0, 0, 0, .85), 0 0 120px -30px rgba(62, 207, 91, .4); }
.gh__art--nodesk .gh__phone { right: 2%; bottom: -6%; width: 34%; }

/* ------------------------------------------------------------------ body */
.gbody { background: var(--white); padding: clamp(56px, 7vw, 96px) 0 clamp(64px, 8vw, 112px); }
.gbody__in { display: grid; grid-template-columns: 220px minmax(0, 780px); gap: clamp(40px, 5vw, 80px); justify-content: center; }
.gtoc { position: sticky; top: 96px; align-self: start; font-size: 14px; }
.gtoc__h { font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.gtoc ol { list-style: none; display: grid; gap: 2px; border-left: 1px solid var(--line); }
.gtoc a { display: block; padding: 6px 0 6px 14px; margin-left: -1px; border-left: 2px solid transparent; color: var(--ink-3); text-decoration: none; line-height: 1.35; }
@media (hover: hover) and (pointer: fine) { .gtoc a:hover { color: var(--ink); border-left-color: var(--line-2); } }

.gart { min-width: 0; color: var(--ink-2); font-size: 17.5px; line-height: 1.72; }
.gart p + p { margin-top: 18px; }
.gart a { font-weight: 500; }
.gsec { padding-top: clamp(40px, 5vw, 56px); }
.gsec:first-of-type { padding-top: 0; }
.gsum + .gsec { padding-top: clamp(40px, 5vw, 56px); }
.gsec > h2, .gsrc h2 { font-size: clamp(26px, 2.6vw, 34px); letter-spacing: -.03em; margin-bottom: 18px; }
.gsec > * + * { margin-top: 22px; }
.gsec > h2 + * { margin-top: 0; }
.gart strong { color: var(--ink); font-weight: 600; }

.gsum { padding: 26px 28px; border-radius: var(--r-lg); background: var(--green-tint); border: 1px solid var(--green-line); }
.gsum__h { font-weight: 600; color: var(--ink); margin-bottom: 12px; }
.gsum .gticks li { font-size: 16.5px; }

.gticks { list-style: none; display: grid; gap: 12px; }
.gticks li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; align-items: start; }
.gticks li > span:first-child { display: grid; place-items: center; width: 22px; height: 22px; margin-top: 4px; border-radius: 50%; background: var(--green-soft); color: var(--green-text); }
.gticks svg { width: 14px; height: 14px; }

.gsteps { list-style: none; counter-reset: gs; display: grid; gap: 16px; }
.gsteps li { counter-increment: gs; position: relative; padding-left: 52px; }
.gsteps li::before { content: counter(gs); position: absolute; left: 0; top: 0; display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: var(--navy); color: var(--green-hi); font: 600 15px/1 var(--fm); }
.gsteps b { display: block; color: var(--ink); font-weight: 600; }

.gnote { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 12px; padding: 18px 22px; border-radius: var(--r); background: var(--amber-bg); border: 1px solid var(--amber-bd); color: #5c3a06; font-size: 16px; line-height: 1.6; }
.gnote__i { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--amber-fg); color: #fff; font-weight: 700; font-size: 14px; }
.gnote a { color: #5c3a06; }

code.ewc { display: inline-block; padding: 1px 7px; border-radius: 6px; background: var(--bg-2); border: 1px solid var(--line); color: var(--ink); font-size: .86em; white-space: nowrap; }

/* tables scroll inside themselves on narrow screens; the page never does */
.gtable { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--r); -webkit-overflow-scrolling: touch; }
.gtable table { width: 100%; border-collapse: collapse; font-size: 15.5px; line-height: 1.5; }
.gtable caption { caption-side: bottom; text-align: left; padding: 12px 16px; font-size: 13.5px; color: var(--muted); border-top: 1px solid var(--line); background: var(--bg); }
.gtable th, .gtable td { padding: 13px 16px; text-align: left; vertical-align: top; border-top: 1px solid var(--line); }
.gtable thead th { border-top: 0; background: var(--bg); font-size: 13px; font-weight: 600; color: var(--ink-3); white-space: nowrap; }
.gtable tbody th { color: var(--ink); font-weight: 600; }
.gtable--codes tbody th { white-space: nowrap; }
.gtable--codes td:nth-child(2) { color: var(--ink-3); min-width: 200px; }

/* real screens */
.gfig, .gphones, .gcard { margin-left: 0; margin-right: 0; }
.gart figcaption { margin-top: 12px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.gfig .frame { box-shadow: var(--sh-frame); }
.gphones__row { display: flex; justify-content: center; gap: clamp(12px, 2.5vw, 28px); padding: clamp(28px, 4vw, 44px) clamp(12px, 3vw, 32px); border-radius: var(--r-xl); background: radial-gradient(420px 220px at 50% 100%, rgba(62, 207, 91, .28), transparent 70%), linear-gradient(180deg, var(--navy), var(--navy-950)); }
.gphones__dev { flex: 0 1 230px; min-width: 0; padding: 6px; border-radius: 28px; background: linear-gradient(160deg, #24324d, #090f1b 60%); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1) inset, 0 24px 50px -20px rgba(0, 0, 0, .8); }
.gphones__dev:nth-child(2) { transform: translateY(-14px); }
.gphones__dev img { width: 100%; border-radius: 22px; aspect-ratio: 390 / 640; object-fit: cover; object-position: top; }
.gcard img { width: 100%; max-width: 520px; border-radius: 14px; border: 1px solid var(--line); box-shadow: var(--sh-2); }
.gstrip { margin: 0; }
.gstrip .gcard img { max-width: 366px; }

/* In Oprivo panel */
.gin { position: relative; isolation: isolate; overflow: clip; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(20px, 3vw, 36px); align-items: center; padding: clamp(24px, 3.4vw, 40px); border-radius: var(--r-xl); background: var(--navy); color: var(--on-dark-2); font-size: 16px; line-height: 1.65; box-shadow: var(--sh-dark); }
.gin::before { content: ""; position: absolute; inset: 0; z-index: -1; background: radial-gradient(380px 260px at 90% 90%, rgba(62, 207, 91, .26), transparent 70%); }
.gin h3 { color: #fff; font-size: 22px; letter-spacing: -.02em; margin-bottom: 12px; }
.gin strong { color: #fff; }
.gin__link { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--green-hi); text-decoration: none; font-weight: 600; }
.gin__media img { width: 100%; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08), 0 24px 50px -20px rgba(0, 0, 0, .8); }
.gin :focus-visible { outline-color: var(--green-hi); }

.gsrc { margin-top: clamp(48px, 6vw, 72px); padding-top: 32px; border-top: 1px solid var(--line); font-size: 15px; }
.gsrc ul { list-style: none; display: grid; gap: 8px; margin-bottom: 16px; }
.gsrc p { color: var(--muted); }

/* ------------------------------------------------------------------ related + hub cards */
.grel { background: var(--bg); padding: clamp(56px, 7vw, 96px) 0; border-top: 1px solid var(--line); }
.grel h2 { font-size: clamp(26px, 2.8vw, 36px); margin-bottom: 28px; }
.grel__grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.ghub { background: var(--bg); padding: clamp(40px, 5vw, 72px) 0 clamp(64px, 8vw, 112px); }
.grel__grid--hub { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.gcardlink { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--r-xl); background: var(--white); border: 1px solid var(--line); box-shadow: var(--sh-1); color: inherit; text-decoration: none; transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease); }
.gcardlink__img { display: block; height: 220px; overflow: hidden; background: radial-gradient(360px 180px at 50% 100%, rgba(62, 207, 91, .3), transparent 70%), var(--navy); padding: 22px 22px 0; }
.gcardlink__img img { width: 100%; height: 100%; object-fit: cover; object-position: top left; border-radius: 10px 10px 0 0; }
.gcardlink__txt { display: grid; gap: 8px; padding: 22px 24px 24px; }
.gcardlink__txt b { color: var(--ink); font-size: 20px; line-height: 1.25; letter-spacing: -.02em; font-weight: 600; }
.gcardlink__txt > span { color: var(--ink-3); font-size: 15.5px; line-height: 1.55; }
.gcardlink__txt em { display: inline-flex; align-items: center; gap: 6px; margin-top: 4px; font-style: normal; font-size: 14px; font-weight: 600; color: var(--green-text); }
@media (hover: hover) and (pointer: fine) { .gcardlink:hover { transform: translateY(-3px); box-shadow: var(--sh-2); border-color: var(--line-2); } }

/* ------------------------------------------------------------------ responsive */
@media (max-width: 1100px) {
  .gbody__in { grid-template-columns: minmax(0, 780px); }
  .gtoc { display: none; }
}
@media (max-width: 960px) {
  .gh__in { grid-template-columns: minmax(0, 1fr); }
  .gh__art { min-height: 0; max-width: 620px; margin: 8px auto 40px; width: 100%; }
  .gh__desk { transform: rotateY(-8deg) rotateX(3deg); width: 88%; }
}
@media (max-width: 720px) {
  .gart { font-size: 16.5px; }
  .gin { grid-template-columns: minmax(0, 1fr); }
  .grel__grid, .grel__grid--hub { grid-template-columns: minmax(0, 1fr); }
  .gcardlink__img { height: 180px; }
  .gh__card { width: 58%; left: -2%; }
  .gh__phone { width: 32%; right: 0; }
  .gphones__row { flex-wrap: wrap; row-gap: 20px; }
  .gphones__dev { flex: 0 1 44%; }
  .gphones__dev:nth-child(2) { transform: none; }
  .gsum { padding: 20px; }
  .gtable th, .gtable td { padding: 11px 12px; }
}
@media (prefers-reduced-motion: reduce) { .gcardlink { transition: none; } }
.ghub__tool { display: grid; gap: 6px; margin-top: 24px; padding: 24px 28px; border-radius: var(--r-xl); background: var(--navy); color: var(--on-dark-2); text-decoration: none; box-shadow: var(--sh-dark); }
.ghub__tool b { color: #fff; font-size: 20px; letter-spacing: -.02em; }
.ghub__tool em { font-style: normal; font-weight: 600; color: var(--green-hi); display: inline-flex; gap: 6px; align-items: center; }
