/* /bio/guides and /bio/guides/<slug> (lib/guide-page.js): the guides behind the reels, for the
   phone that came from the Instagram bio. Sits on top of bio.css: same paper, ink and lime,
   same hard shadows, one column. */

.g-wrap { padding-top: 10px; }

/* the row at the top: back to the links, and to all guides */
.g-top {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  max-width: 480px; margin: 0 auto;
  padding: calc(14px + env(safe-area-inset-top)) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
}
.g-back {
  display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px;
  font-size: 13px; font-weight: 700; color: var(--ink); text-decoration: none;
  background: var(--card); border: 2px solid var(--line); border-radius: 99px; box-shadow: 3px 3px 0 var(--shadow);
}
.g-back:active { transform: translate(3px, 3px); box-shadow: none; }

/* ---------- the top of a guide: the post, the title ---------- */
.g-hero { text-align: center; padding: 14px 0 6px; animation: rise 0.5s var(--ease) both; }
.g-hero--index { padding-bottom: 10px; }
.g-cover {
  position: relative; display: block; width: min(240px, 68%); margin: 0 auto 18px; aspect-ratio: 4 / 5;
  background: #000; border: 2px solid var(--line); border-radius: 18px; box-shadow: 5px 5px 0 var(--shadow);
  overflow: hidden; text-decoration: none;
}
.g-cover img { display: block; width: 100%; height: 100%; object-fit: cover; }
a.g-cover:active { transform: translate(5px, 5px); box-shadow: none; }
.g-blank {
  display: grid; place-content: center; width: 100%; height: 100%; padding: 16px;
  color: #f5f2ea; font: 22px/1.05 Anton, Impact, sans-serif; text-transform: uppercase; text-align: center;
  background: linear-gradient(160deg, #1f3a30, #0f1f1a);
}
.g-play {
  position: absolute; right: 10px; bottom: 10px; width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--lime); color: #0f1f1a; border: 2px solid #0f1f1a; border-radius: 12px; box-shadow: 3px 3px 0 #0f1f1a;
}
.g-play svg { width: 18px; height: 18px; margin-left: 2px; }
.g-play--small { width: 30px; height: 30px; right: 6px; bottom: 6px; border-radius: 8px; box-shadow: 2px 2px 0 #0f1f1a; }
.g-play--small svg { width: 12px; height: 12px; }
.g-stack { position: absolute; right: 12px; top: 12px; width: 18px; height: 18px; }
.g-stack::before, .g-stack::after {
  content: ''; position: absolute; inset: 0; border: 2px solid #0f1f1a; border-radius: 4px; background: #fff;
}
.g-stack::before { transform: translate(4px, -4px); background: var(--lime); }
.g-eyebrow { margin: 0 0 6px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.1em; color: var(--soft); }
.g-title {
  margin: 0; font: 34px/0.95 Anton, Impact, sans-serif; letter-spacing: 0.01em; text-transform: uppercase; text-wrap: balance;
}
.g-intro { margin: 12px auto 0; max-width: 38ch; font-size: 15.5px; color: var(--soft); }
.g-intro p { margin: 0 0 8px; }
.g-intro p:last-child { margin-bottom: 0; }
.g-btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 16px; }
.g-btn {
  display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 0 18px;
  font: 16px/1 Anton, Impact, sans-serif; letter-spacing: 0.04em; text-transform: uppercase; text-decoration: none;
  color: var(--ink); background: var(--card); border: 2px solid var(--line); border-radius: 99px; box-shadow: 4px 4px 0 var(--shadow);
}
.g-btn svg { width: 16px; height: 16px; }
.g-btn--lime { background: var(--lime); color: var(--on-lime); border-color: #0f1f1a; }
.g-btn:active { transform: translate(4px, 4px); box-shadow: none; }

/* ---------- the body of a guide ---------- */
.g-wrap section { margin-top: 6px; }
.g-wrap p { line-height: 1.5; }
.g-wrap section a:not(.g-btn) { color: var(--ink); text-decoration-thickness: 2px; text-decoration-color: var(--lime); text-underline-offset: 2px; overflow-wrap: anywhere; }
.g-wrap code, .g-copy pre {
  font: 13.5px/1.5 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.g-wrap code { background: color-mix(in srgb, var(--ink) 9%, transparent); padding: 1px 5px; border-radius: 5px; }

.g-list {
  list-style: none; margin: 0; padding: 14px 16px;
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow);
  display: grid; gap: 8px;
}
.g-list li { position: relative; padding-left: 22px; line-height: 1.45; font-size: 15.5px; }
.g-list li::before {
  content: ''; position: absolute; left: 0; top: 7px; width: 10px; height: 10px; border-radius: 3px;
  background: var(--lime); border: 2px solid #0f1f1a;
}

.g-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.g-step {
  position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 14px 14px 14px 12px;
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow);
  animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i) * 50ms);
}
.g-step-n {
  flex: none; display: grid; place-items: center; width: 34px; height: 34px; margin-top: 1px;
  font: 17px/1 Anton, Impact, sans-serif; background: var(--lime); color: var(--on-lime);
  border: 2px solid #0f1f1a; border-radius: 10px;
}
.g-step-body { flex: 1; min-width: 0; }
.g-step h3 { margin: 6px 0 6px; font: 21px/1.05 Anton, Impact, sans-serif; letter-spacing: 0.01em; text-transform: uppercase; }
.g-step p { margin: 0 0 8px; font-size: 15.5px; }
.g-step p:last-child { margin-bottom: 0; }
.g-sub { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.g-sub > li:not(.g-copy):not(.g-sub-fig) { position: relative; padding-left: 20px; font-size: 15px; line-height: 1.45; }
.g-sub > li:not(.g-copy):not(.g-sub-fig)::before { content: '→'; position: absolute; left: 0; top: 0; font-weight: 800; color: var(--soft); }
.g-copy { position: relative; margin: 4px 0; background: var(--paper); border: 2px dashed var(--line); border-radius: 12px; }
.g-copy pre { margin: 0; padding: 12px 12px 46px; white-space: pre-wrap; overflow-wrap: anywhere; }
.g-copy-btn {
  position: absolute; right: 8px; bottom: 8px; min-height: 32px; padding: 0 12px; cursor: pointer;
  font: 13px/1 Anton, Impact, sans-serif; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--lime); color: #0f1f1a; border: 2px solid #0f1f1a; border-radius: 99px; box-shadow: 2px 2px 0 #0f1f1a;
}
.g-copy-btn:active, .g-copy-btn.did { transform: translate(2px, 2px); box-shadow: none; }
.g-copy-btn.did { background: var(--gold); }
.g-copy--long pre { max-height: 190px; overflow: hidden; padding-bottom: 12px; margin-bottom: 46px;
  -webkit-mask-image: linear-gradient(#000 60%, transparent); mask-image: linear-gradient(#000 60%, transparent); }
.g-copy--long.open pre { max-height: none; -webkit-mask-image: none; mask-image: none; }
.g-more-btn {
  position: absolute; left: 8px; bottom: 8px; min-height: 32px; padding: 0 12px; cursor: pointer;
  font: 13px/1 Anton, Impact, sans-serif; letter-spacing: 0.05em; text-transform: uppercase;
  background: transparent; color: var(--ink); border: 2px solid var(--line); border-radius: 99px;
}
.g-fig, .g-sub-fig { margin: 8px 0; line-height: 0; }
.g-fig img, .g-sub-fig img { max-width: 100%; height: auto; border: 2px solid var(--line); border-radius: 12px; box-shadow: 3px 3px 0 var(--shadow); }

.g-end { text-align: center; margin-top: 30px; }
.g-end .sec-head { justify-content: center; }
.g-end p { color: var(--soft); font-size: 15px; margin: 0; }

/* ---------- /bio/guides: the grid ---------- */
.g-grid { list-style: none; margin: 10px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.g-grid li { animation: rise 0.5s var(--ease) both; animation-delay: calc(var(--i) * 50ms); }
.g-card {
  display: block; text-decoration: none; color: var(--ink);
  background: var(--card); border: 2px solid var(--line); border-radius: 16px; box-shadow: 4px 4px 0 var(--shadow); overflow: hidden;
}
.g-card:active { transform: translate(4px, 4px); box-shadow: none; }
.g-card-pic { position: relative; display: block; aspect-ratio: 4 / 5; background: #000; border-bottom: 2px solid var(--line); }
.g-card-pic img { display: block; width: 100%; height: 100%; object-fit: cover; }
.g-card-pic .g-blank { font-size: 17px; padding: 10px; }
.g-card-title { display: block; padding: 10px 12px 12px; font-weight: 750; font-size: 14.5px; line-height: 1.25; overflow-wrap: anywhere; }

.foot p a { color: var(--soft); }
