/* brisk. Direction D: guide landing pages (digitalni kutak Alati pattern).
   Sticky sidebar with author and contents, open sections, gated sections
   blurred until html.guides-unlocked, email gate, read next. */

.gd { position: relative; padding: 112px 0 var(--sec); }
.gd::before { content: ''; position: absolute; inset: 0 0 auto; height: 520px; background-image: radial-gradient(var(--grid) 1.2px, transparent 1.3px); background-size: 20px 20px; -webkit-mask-image: radial-gradient(ellipse 70% 80% at 60% 0%, #000 20%, transparent 75%); mask-image: radial-gradient(ellipse 70% 80% at 60% 0%, #000 20%, transparent 75%); pointer-events: none; }
.gd-grid { position: relative; display: grid; grid-template-columns: 250px minmax(0, 720px); gap: clamp(32px, 5vw, 72px); justify-content: center; }

/* ---------- sidebar ---------- */
.gd-side { position: sticky; top: 92px; align-self: start; display: grid; gap: 22px; max-height: calc(100vh - 110px); overflow-y: auto; padding-bottom: 8px; scrollbar-width: thin; }
.gd-back { font-size: 13.5px; color: var(--ink-2); text-decoration: none; display: inline-flex; gap: 6px; align-items: center; }
.gd-back:hover { color: var(--accent); }
.gd-author { padding: 16px; display: grid; grid-template-columns: 44px 1fr; gap: 4px 12px; align-items: center; }
.gd-author img { width: 44px; height: 44px; border-radius: 999px; object-fit: cover; grid-row: span 2; }
.gd-author strong { font-family: var(--f-display); font-size: 14.5px; line-height: 1.2; }
.gd-author span { font-size: 12.5px; color: var(--muted); line-height: 1.2; }
.gd-author .btn { grid-column: 1 / -1; margin-top: 10px; width: 100%; height: 36px; font-size: 13px; }
.gd-toc-head { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.gd-toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1px; }
.gd-toc a { display: grid; grid-template-columns: 24px 1fr auto; gap: 6px; align-items: start; padding: 7px 8px; border-radius: var(--r); font-size: 13.5px; line-height: 1.35; color: var(--ink-2); text-decoration: none; transition: background-color .2s, color .2s; }
.gd-toc a:hover { background: var(--accent-soft); color: var(--ink); }
.gd-toc a.is-active { background: var(--accent-soft); color: var(--ink); }
.gd-num { font-family: var(--f-mono); font-size: 11.5px; color: var(--accent); padding-top: 1px; }
.gd-lock { width: 12px; height: 12px; margin-top: 3px; color: var(--muted); }
html.guides-unlocked .gd-lock { display: none; }

/* ---------- main ---------- */
.gd-topic { text-decoration: none; display: inline-flex; align-items: center; gap: 8px; }

.gd-title { font-size: clamp(30px, 3.6vw, 44px); font-weight: 700; line-height: 1.1; letter-spacing: -.03em; margin: 14px 0 14px; }
.gd-sub { font-size: 17px; color: var(--ink-2); line-height: 1.55; max-width: 60ch; }
.gd-author--inline { display: none; margin-top: 20px; }
.gd-stats { display: grid; grid-template-columns: repeat(var(--n, 3), 1fr); margin: 28px 0 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.gd-stats div { padding: 16px 18px 16px 0; }
.gd-stats div + div { padding-left: 18px; border-left: 1px solid var(--line); }
.gd-stats dd { margin: 0; font-family: var(--f-display); font-size: 26px; font-weight: 700; letter-spacing: -.02em; color: #006653; line-height: 1.1; }
:root[data-theme="dark"] .gd-stats dd { color: var(--accent); }
.gd-stats dt { font-size: 12.5px; color: var(--muted); margin-top: 4px; }
.gd-stats div { display: flex; flex-direction: column-reverse; }
.gd-toc-inline { display: none; margin-top: 20px; padding: 0; overflow: hidden; }
.gd-toc-inline summary { cursor: pointer; padding: 14px 16px; font-family: var(--f-display); font-weight: 600; font-size: 14.5px; list-style: none; display: flex; justify-content: space-between; }
.gd-toc-inline summary::after { content: '+'; color: var(--accent); }
.gd-toc-inline[open] summary::after { content: '−'; }
.gd-toc-inline ol { padding: 0 8px 10px; }

.gd-intro { margin-top: 32px; display: grid; gap: 14px; font-size: 16.5px; color: var(--ink-2); line-height: 1.65; }
.gd-sec { padding-top: 44px; scroll-margin-top: 96px; }
.gd-sec h2 { font-size: clamp(22px, 2.3vw, 27px); font-weight: 700; letter-spacing: -.02em; line-height: 1.2; display: flex; gap: 12px; align-items: baseline; margin-bottom: 16px; }
.gd-sec h2 span { font-family: var(--f-mono); font-size: 14px; font-weight: 500; color: var(--accent); letter-spacing: 0; }
.gd-body { display: grid; gap: 14px; }
.gd-body > p { font-size: 16px; color: var(--ink-2); line-height: 1.65; }
.gd-body a:not(.btn) { color: var(--accent); text-underline-offset: 3px; }

/* blocks */
.gd-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; counter-reset: st; }
.gd-steps li { counter-increment: st; display: grid; grid-template-columns: 28px 1fr; gap: 2px 12px; padding: 16px 18px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
.gd-steps li::before { content: counter(st); grid-row: span 2; width: 24px; height: 24px; border-radius: 999px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font-family: var(--f-mono); font-size: 12px; font-weight: 600; }
.gd-steps b { font-family: var(--f-display); font-size: 15.5px; color: var(--ink); }
.gd-steps span { font-size: 14.5px; color: var(--ink-2); line-height: 1.55; }
.gd-prompt { border: 1px solid var(--line); border-left: 3px solid var(--accent); border-radius: var(--r); background: var(--card-2); overflow: hidden; }
.gd-prompt-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--line); }
.gd-prompt-head span { font-family: var(--f-display); font-weight: 600; font-size: 13.5px; }
.gd-copy { height: 30px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--line-2); background: var(--card); color: var(--ink-2); font-size: 12.5px; cursor: pointer; transition: border-color .2s, color .2s; }
.gd-copy:hover { border-color: var(--accent); color: var(--accent); }
.gd-copy.is-done { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.gd-prompt pre { margin: 0; padding: 14px 16px 16px; font-family: var(--f-mono); font-size: 12.5px; line-height: 1.7; color: var(--ink); white-space: pre-wrap; word-break: break-word; }
.gd-prompt pre mark { background: var(--hl); color: inherit; padding: 0 3px; border-radius: 2px; }
.gd-note { padding: 16px 18px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 20%, transparent); }
.gd-note b { display: block; font-family: var(--f-display); font-size: 14.5px; margin-bottom: 4px; color: var(--ink); }
.gd-note p { font-size: 14.5px; color: var(--ink-2); line-height: 1.6; }
.gd-check { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gd-check li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; font-size: 15px; color: var(--ink-2); line-height: 1.5; }
.gd-check li::before { content: ''; width: 18px; height: 18px; margin-top: 1px; border-radius: 3px; border: 1.5px solid var(--accent); background: var(--card); }
.gd-table { width: 100%; border-collapse: collapse; font-size: 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.gd-table th { text-align: left; padding: 10px 14px; font-family: var(--f-mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--card-2); border-bottom: 1px solid var(--line); }
.gd-table td { padding: 11px 14px; border-top: 1px solid var(--line); color: var(--ink-2); vertical-align: top; }
.gd-table td:first-child { color: var(--ink); font-weight: 600; font-family: var(--f-display); }
.gd-table .mono-cell { font-family: var(--f-mono); font-size: 12.5px; }
.gd-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.gd-links a { display: flex; justify-content: space-between; gap: 12px; padding: 14px 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); text-decoration: none; color: var(--ink); font-family: var(--f-display); font-weight: 600; font-size: 15px; transition: border-color .2s, transform .3s var(--ease); }
.gd-links a:hover { border-color: var(--accent); transform: translateX(3px); }
.gd-links small { display: block; font-family: var(--f-body); font-weight: 400; font-size: 13.5px; color: var(--muted); margin-top: 2px; }
.gd-links a::after { content: '→'; color: var(--accent); }
.gd-placeholder { padding: 18px; border: 1.5px dashed var(--line-2); border-radius: var(--r); font-family: var(--f-mono); font-size: 12.5px; color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 10px, var(--card-2) 10px 20px); }

/* ---------- lock zone ---------- */
.gd-lockzone { position: relative; margin-top: 8px; }
.gd-unlocked-note { display: none; margin-top: 40px; padding: 16px 18px; border-radius: var(--r); background: var(--accent-soft); border: 1px solid color-mix(in srgb, var(--accent) 25%, transparent); font-size: 14.5px; color: var(--ink-2); }
.gd-unlocked-note strong { color: var(--ink); font-family: var(--f-display); margin-right: 6px; }
html.guides-unlocked .gd-unlocked-note { display: block; animation: gdIn .6s var(--ease) both; }
.gd-gated { position: relative; transition: filter .9s var(--ease), opacity .9s var(--ease); }
/* a short blurred teaser (about a third of what it was), so the unlock box follows right away */
html:not(.guides-unlocked) .gd-gated { max-height: 220px; overflow: hidden; filter: blur(6px); opacity: .6; user-select: none; pointer-events: none; -webkit-mask-image: linear-gradient(#000 20%, transparent 100%); mask-image: linear-gradient(#000 20%, transparent 100%); }
html.guides-unlocked .gd-gated { animation: gdReveal .9s var(--ease) both; }
@keyframes gdReveal { from { filter: blur(6px); opacity: .5; } to { filter: none; opacity: 1; } }
@keyframes gdIn { from { opacity: 0; transform: translateY(8px); } }

.gd-gate { position: relative; margin-top: -48px; padding: clamp(24px, 4vw, 36px); text-align: center; box-shadow: var(--shadow-lg); }
.gd-gate .eyebrow { display: inline-flex; align-items: center; gap: 8px; }
.gd-gate .eyebrow svg { width: 13px; height: 13px; }
.gd-gate h2 { font-size: clamp(22px, 2.4vw, 28px); font-weight: 700; letter-spacing: -.02em; margin: 12px 0 10px; }
.gd-gate > p { font-size: 15px; color: var(--ink-2); max-width: 52ch; margin: 0 auto; }
.gd-gate .gate { max-width: 460px; margin: 22px auto 0; justify-content: center; }
.gd-gate .gate-msg { text-align: center; }
.gd-gate .fine { font-size: 12.5px; color: var(--muted); margin-top: 10px; }
.gd-gate .fine a { color: var(--muted); }
html.guides-unlocked .gd-gate { display: none; }

.gd-after { margin-top: 36px; padding: 20px 22px; display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.gd-after p { font-size: 14.5px; color: var(--ink-2); }
.gd-after b { display: block; font-family: var(--f-display); color: var(--ink); font-size: 15px; }
html:not(.guides-unlocked) .gd-after .btn { opacity: .45; pointer-events: none; }
html:not(.guides-unlocked) .gd-after .when-unlocked-txt, html.guides-unlocked .gd-after .when-locked-txt { display: none; }

/* ---------- read next ---------- */
.gd-next-head { font-size: 20px; font-weight: 700; letter-spacing: -.02em; margin: 56px 0 16px; }
.gd-next { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.gd-next a { display: flex; flex-direction: column; gap: 6px; padding: 18px; text-decoration: none; }
.gd-next a:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--line-2); }
.gd-next span { font-family: var(--f-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.gd-next strong { font-family: var(--f-display); font-size: 15.5px; line-height: 1.3; color: var(--ink); }
.gd-next em { font-style: normal; font-size: 13px; color: var(--accent); margin-top: auto; padding-top: 6px; }
.gd-cta { margin-top: 56px; }

/* ---------- responsive ---------- */
@media (max-width: 960px) {
  .gd-grid { grid-template-columns: minmax(0, 1fr); }
  .gd-side { display: none; }
  .gd-author--inline { display: grid; max-width: 360px; }
  .gd-author--inline .btn { display: none; }
  .gd-author--inline a.sub { font-size: 12.5px; color: var(--accent); text-decoration: none; }
  .gd-toc-inline { display: block; }
  .gd { padding-top: 96px; }
}
@media (max-width: 640px) {
  .gd-next { grid-template-columns: 1fr; }
  .gd-stats dd { font-size: 22px; }
  .gd-stats div { padding-right: 10px; }
  .gd-stats div + div { padding-left: 12px; }
  .gd-gate { margin-top: -36px; }
  html:not(.guides-unlocked) .gd-gated { max-height: 180px; }
  .gd-table { display: block; overflow-x: auto; }
}
html.rm .gd-gated, html.rm .gd-unlocked-note { animation: none !important; transition: none !important; }
.gd-date { margin: 10px 0 0; font-size: 13px; color: var(--muted); }

/* Skill guide extras (seo-aeo-geo-skill): proof note, looping infographic, visible FAQ. */
.gd-proof-note { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.gd-video { margin: 6px 0 0; }
.gd-video video { display: block; width: 100%; max-width: 420px; height: auto; border-radius: var(--r); border: 1px solid var(--line); background: var(--card); }
.gd-faq { margin-top: 40px; }
.gd-faq-item { padding: 16px 0; border-top: 1px solid var(--line); }
.gd-faq-item h3 { font-family: var(--f-display); font-size: 16px; font-weight: 600; color: var(--ink); }
.gd-faq-item p { margin-top: 6px; font-size: 15px; color: var(--ink-2); line-height: 1.6; }

/* Substack's own subscribe box, shown once a guide is unlocked (lazy iframe stays unloaded while hidden). */
.gd-newsletter { display: none; margin-top: 36px; padding: 22px; gap: 16px; }
html.guides-unlocked .gd-newsletter { display: grid; }
.gd-newsletter h2 { font-family: var(--f-display); font-size: 20px; margin-top: 8px; color: var(--ink); }
.gd-newsletter p { margin-top: 6px; font-size: 14.5px; color: var(--ink-2); }
.gd-newsletter iframe { width: 100%; max-width: 480px; height: 150px; border: 1px solid var(--line); border-radius: var(--r); background: #fff; }
