/* css/guide-page.css — DVP Tool Guide Design System */

/* Per-tool accent override: set --tool-accent in each guide.html <style> block */
:root {
  --guide-bg:           #06080f;
  --guide-panel:        rgba(10, 18, 30, 0.66);
  --guide-panel-solid:  #0a121e;
  --guide-line:         rgba(255, 255, 255, 0.08);
  --guide-line-strong:  rgba(255, 255, 255, 0.16);
  --guide-text:         #e8f0fc;
  --guide-muted:        #8ea6c6;
  --guide-dim:          #4a6a8a;
  --guide-ok:           #39d98a;
  --guide-warn:         #f59e0b;
  --guide-info:         #60a5fa;
  --guide-accent:       var(--tool-accent, #ff7338);
  --guide-mono:         "DM Mono", Consolas, monospace;
  --guide-display:      "Cinzel", Georgia, serif;
  --guide-body:         "Inter", ui-sans-serif, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--guide-bg); scroll-behavior: smooth; color-scheme: dark; }
body {
  margin: 0;
  min-height: 100vh;
  color: var(--guide-text);
  font-family: var(--guide-body);
  background:
    radial-gradient(ellipse 80% 50% at 12% -10%, rgba(255, 115, 56, .14), transparent 55%),
    radial-gradient(ellipse 65% 45% at 90% -8%,  rgba(255, 45, 120, .10), transparent 55%),
    var(--guide-bg);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: .024;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-size: 200px 200px;
}
a { color: inherit; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--guide-display); letter-spacing: .02em; margin: 0; }
p, li, a, span, strong, code, .guide-section-lead, .guide-hero-tagline,
.api-step-body, .walk-step-title, .output-caption, .related-card-desc,
.callout, .pro-tip-item {
  overflow-wrap: anywhere;
  word-break: normal;
}

/* ── SHELL ── */
.guide-shell { position: relative; z-index: 1; }
.guide-wrap {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

/* ── TOPBAR ── */
.guide-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 64px;
  padding: 0 clamp(16px, 3vw, 36px);
  border-bottom: 1px solid var(--guide-line);
  background: rgba(6, 8, 15, .94);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}
.guide-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  text-decoration: none;
  color: var(--guide-muted);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  transition: color .15s;
}
.guide-brand:hover { color: var(--guide-text); }
.guide-brand img { width: 26px; height: auto; flex-shrink: 0; }
.guide-topbar-tool {
  font-family: var(--guide-display);
  font-size: 13px;
  letter-spacing: .05em;
  color: var(--guide-text);
  min-width: 0;
  max-width: 42vw;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.guide-open-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 18px;
  border-radius: 6px;
  border: 1px solid var(--guide-accent);
  background: var(--guide-accent);
  color: #05080f;
  font-family: var(--guide-mono);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
  white-space: nowrap;
  transition: opacity .15s;
}
.guide-open-btn:hover { opacity: .82; }

/* ── HERO ── */
.guide-hero {
  position: relative;
  min-height: 480px;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}
.guide-hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  z-index: 0;
}
.guide-hero-grad {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: linear-gradient(
    to bottom,
    rgba(6, 8, 15, .18) 0%,
    rgba(6, 8, 15, .38) 35%,
    rgba(6, 8, 15, .78) 68%,
    rgba(6, 8, 15, 1)   100%
  );
}
.guide-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  padding-bottom: 56px;
}
.guide-eyebrow {
  font-family: var(--guide-mono);
  font-size: .6rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--guide-accent);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  line-height: 1.5;
}
.guide-eyebrow::before {
  content: "";
  display: block;
  width: 22px;
  height: 1px;
  background: var(--guide-accent);
  flex-shrink: 0;
}
.guide-hero-title {
  font-size: clamp(2.8rem, 7vw, 5.2rem);
  line-height: .96;
  color: #fff;
  margin-bottom: 16px;
  max-width: 12ch;
}
.guide-hero-tagline {
  font-size: 1.05rem;
  font-weight: 300;
  color: rgba(232, 240, 252, .72);
  max-width: 520px;
  line-height: 1.55;
  margin-bottom: 24px;
}
.guide-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.guide-badge {
  min-width: 0;
  max-width: 100%;
  font-family: var(--guide-mono);
  font-size: .56rem;
  letter-spacing: .1em;
  line-height: 1.42;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  border: 1px solid var(--guide-line-strong);
  background: rgba(10, 18, 30, .62);
  backdrop-filter: blur(8px);
  color: var(--guide-muted);
}
.guide-badge.badge-ok {
  border-color: rgba(57, 217, 138, .4);
  color: var(--guide-ok);
  background: rgba(57, 217, 138, .08);
}
.guide-badge.badge-key {
  border-color: rgba(255, 115, 56, .4);
  color: var(--guide-accent);
  background: rgba(255, 115, 56, .08);
}

/* ── SECTION SHELL ── */
.guide-section {
  padding: 64px 0;
  border-bottom: 1px solid var(--guide-line);
}
.guide-section:last-of-type { border-bottom: none; }
.section-label {
  font-family: var(--guide-mono);
  font-size: .58rem;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--guide-accent);
  margin-bottom: 10px;
}
.guide-section-title {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  margin-bottom: 10px;
}
.guide-section-lead {
  font-size: .95rem;
  color: var(--guide-muted);
  max-width: 640px;
  line-height: 1.7;
  margin-bottom: 36px;
}

/* ── PREREQUISITES ── */
.prereq-callout {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 20px 24px;
  border-radius: 10px;
  border: 1px solid rgba(57, 217, 138, .28);
  background: rgba(57, 217, 138, .06);
  color: var(--guide-text);
  font-size: .92rem;
  line-height: 1.6;
}
.prereq-icon { font-size: 1.3rem; flex-shrink: 0; padding-top: 2px; }
.prereq-callout strong { color: var(--guide-ok); display: block; margin-bottom: 4px; }

.api-steps { display: flex; flex-direction: column; gap: 20px; }
.api-step {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 0 22px;
  padding: 24px;
  border-radius: 12px;
  border: 1px solid var(--guide-line);
  background: var(--guide-panel);
}
.api-step-num {
  grid-row: 1 / 4;
  font-family: var(--guide-display);
  font-size: 2.6rem;
  line-height: 1;
  color: var(--guide-accent);
  opacity: .38;
  padding-top: 2px;
}
.api-step-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--guide-text);
  margin-bottom: 6px;
}
.api-step-body {
  font-size: .88rem;
  color: var(--guide-muted);
  line-height: 1.65;
}
.api-step-body a { color: var(--guide-accent); text-decoration: underline; text-underline-offset: 3px; }
.api-step-img {
  grid-column: 2;
  margin-top: 14px;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid var(--guide-line);
}
.api-step-img img { width: 100%; display: block; }

/* ── WALKTHROUGH ── */
.walkthrough { display: flex; flex-direction: column; gap: 60px; }
.walk-step-header {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  margin-bottom: 22px;
}
.walk-step-num {
  font-family: var(--guide-display);
  font-size: 3rem;
  line-height: 1;
  color: var(--guide-accent);
  opacity: .24;
  flex-shrink: 0;
}
.walk-step-title {
  min-width: 0;
  font-size: clamp(1.2rem, 2.5vw, 1.7rem);
  line-height: 1.18;
}
.annotated-img {
  position: relative;
  margin-bottom: 24px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--guide-line);
}
.annotated-img img { width: 100%; display: block; }
.callout-pin {
  position: absolute;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--guide-accent);
  color: #05080f;
  font-family: var(--guide-mono);
  font-size: .6rem;
  font-weight: 700;
  box-shadow: 0 2px 14px rgba(0, 0, 0, .55);
  z-index: 2;
  pointer-events: none;
}
.walk-steps-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
  counter-reset: wstep;
}
.walk-steps-list li {
  counter-increment: wstep;
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr);
  gap: 10px;
  align-items: baseline;
  font-size: .92rem;
  line-height: 1.62;
  color: rgba(232, 240, 252, .9);
}
.walk-steps-list li::before {
  content: counter(wstep);
  font-family: var(--guide-mono);
  font-size: .56rem;
  color: var(--guide-accent);
  width: 22px;
  height: 22px;
  border: 1px solid rgba(255, 115, 56, .35);
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.callout {
  display: flex;
  min-width: 0;
  gap: 12px;
  align-items: flex-start;
  padding: 13px 18px;
  border-radius: 8px;
  margin-top: 14px;
  font-size: .86rem;
  line-height: 1.58;
}
.callout[data-type="tip"] {
  border: 1px solid rgba(57, 217, 138, .24);
  background: rgba(57, 217, 138, .05);
  color: rgba(232, 240, 252, .82);
}
.callout[data-type="tip"]::before {
  content: "TIP";
  font-family: var(--guide-mono);
  font-size: .52rem;
  letter-spacing: .1em;
  color: var(--guide-ok);
  flex-shrink: 0;
  padding-top: 1px;
  white-space: nowrap;
}
.callout[data-type="warn"] {
  border: 1px solid rgba(245, 158, 11, .24);
  background: rgba(245, 158, 11, .05);
  color: rgba(232, 240, 252, .82);
}
.callout[data-type="warn"]::before {
  content: "NOTE";
  font-family: var(--guide-mono);
  font-size: .52rem;
  letter-spacing: .1em;
  color: var(--guide-warn);
  flex-shrink: 0;
  padding-top: 1px;
  white-space: nowrap;
}

/* ── OUTPUT GALLERY ── */
.output-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 20px;
}
.output-card {
  border-radius: 12px;
  border: 1px solid var(--guide-line);
  overflow: hidden;
  background: var(--guide-panel);
}
.output-card img {
  width: 100%;
  display: block;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}
.output-caption {
  padding: 14px 18px;
  font-size: .84rem;
  color: var(--guide-muted);
  line-height: 1.55;
  min-width: 0;
}
.output-caption strong {
  color: var(--guide-text);
  display: block;
  margin-bottom: 4px;
  font-size: .88rem;
}

/* ── PRO TIPS ── */
.pro-tips { display: flex; flex-direction: column; gap: 14px; }
.pro-tip-item {
  display: grid;
  grid-template-columns: 20px minmax(0, 1fr);
  gap: 12px;
  align-items: baseline;
  font-size: .92rem;
  color: rgba(232, 240, 252, .88);
  line-height: 1.62;
}
.pro-tip-item::before {
  content: "→";
  color: var(--guide-accent);
  font-size: .8rem;
}

/* ── GUIDE FOOTER ── */
.guide-footer { padding: 64px 0 40px; }
.guide-footer-cta {
  text-align: center;
  padding-bottom: 56px;
  border-bottom: 1px solid var(--guide-line);
  margin-bottom: 48px;
}
.guide-footer-cta h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 22px; }
.guide-footer-open {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 15px 36px;
  border-radius: 8px;
  border: 1px solid var(--guide-accent);
  background: var(--guide-accent);
  color: #05080f;
  font-family: var(--guide-mono);
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .08em;
}
.related-label {
  font-family: var(--guide-mono);
  font-size: .58rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--guide-dim);
  margin-bottom: 16px;
}
.related-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}
.related-card {
  min-width: 0;
  padding: 20px;
  border-radius: 10px;
  border: 1px solid var(--guide-line);
  background: var(--guide-panel);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.related-card:hover {
  border-color: var(--guide-accent);
  background: rgba(255, 115, 56, .04);
}
.related-card-eyebrow {
  font-family: var(--guide-mono);
  font-size: .54rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--guide-accent);
  margin-bottom: 6px;
}
.related-card-name {
  font-family: var(--guide-display);
  font-size: 1.05rem;
  color: var(--guide-text);
  margin-bottom: 6px;
  letter-spacing: .02em;
}
.related-card-desc { font-size: .82rem; color: var(--guide-muted); line-height: 1.5; }
.site-foot-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 24px;
  border-top: 1px solid var(--guide-line);
  font-size: .82rem;
  color: var(--guide-dim);
  flex-wrap: wrap;
  gap: 12px;
}
.site-foot-links { display: flex; gap: 20px; flex-wrap: wrap; }
.site-foot-links a { color: var(--guide-muted); text-decoration: none; transition: color .15s; }
.site-foot-links a:hover { color: var(--guide-text); }

/* ── GUIDE PILL (added to tool pages) ── */
.guide-pill {
  font-family: "DM Mono", Consolas, monospace;
  font-size: .6rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 5px 12px;
  border-radius: 3px;
  border: 1px solid color-mix(in srgb, var(--guide-accent) 32%, transparent);
  background: color-mix(in srgb, var(--guide-accent) 8%, transparent);
  color: var(--guide-accent);
  text-decoration: none;
  white-space: nowrap;
  transition: background .15s, border-color .15s;
}
.guide-pill:hover {
  background: color-mix(in srgb, var(--guide-accent) 16%, transparent);
  border-color: color-mix(in srgb, var(--guide-accent) 58%, transparent);
}

/* ── RESPONSIVE ── */
@media (max-width: 768px) {
  .guide-hero { min-height: 360px; }
  .api-step { grid-template-columns: 1fr; }
  .api-step-num { display: none; }
  .related-tools { grid-template-columns: 1fr; }
  .site-foot-row { flex-direction: column; align-items: flex-start; }
  .guide-wrap { width: min(1180px, calc(100% - 28px)); }
  .guide-topbar {
    min-height: 58px;
    gap: 10px;
    padding-inline: 14px;
  }
  .guide-topbar-tool { display: none; }
  .guide-brand {
    font-size: 10px;
    letter-spacing: .06em;
  }
  .guide-open-btn {
    padding-inline: 12px;
    font-size: 10px;
    letter-spacing: .06em;
  }
  .guide-badges { align-items: flex-start; }
  .guide-badge { white-space: normal; }
  .callout {
    flex-direction: column;
    gap: 8px;
  }
}
@media (max-width: 480px) {
  .guide-hero-title { font-size: 2.4rem; }
  .walk-step-header { flex-direction: column; gap: 4px; }
  .walk-step-num { font-size: 1.8rem; opacity: .3; }
  .guide-section { padding: 48px 0; }
  .output-gallery { grid-template-columns: minmax(0, 1fr); }
  .guide-footer-open { width: 100%; justify-content: center; padding-inline: 18px; }
}
