/* ────────────────────────────────────────────────────────────────
   Dear Glory · Worksheet gate
   The visible <aside> on the article + the modal that pops on
   "Download the PDF". Brand tokens are inherited from the host page.
   ──────────────────────────────────────────────────────────────── */

/* ── The aside on the article ─────────────────────────────────── */
.article-worksheet {
  margin: 48px 0 56px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 28px;
  align-items: center;
  background: var(--paper-soft);
  border-left: 4px solid var(--gold);
  padding: 28px 32px;
}
.article-worksheet-eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--copper);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--copper);
  margin-bottom: 14px;
}
.article-worksheet-h {
  font-family: var(--display);
  font-size: 30px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: 0.012em;
  color: var(--burgundy);
  margin-bottom: 10px;
}
.article-worksheet-h em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--copper);
}
.article-worksheet-p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 20px;
}
.article-worksheet-btn,
.article-worksheet-trigger {
  font-family: var(--sans);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  padding: 18px 28px;
  background: var(--burgundy);
  color: var(--ivory);
  border: 1px solid var(--burgundy);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  transition: all 0.22s;
}
.article-worksheet-btn:hover,
.article-worksheet-trigger:hover {
  background: var(--gold);
  color: var(--burgundy-dark);
  border-color: var(--gold);
}
.article-worksheet-trigger svg {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
}
.article-worksheet-helper {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--ink-faint);
  margin-top: 12px;
  line-height: 1.5;
}
.article-worksheet-helper em {
  font-family: var(--serif);
  font-style: italic;
  color: var(--copper);
}
.article-worksheet-r {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  background: #fff;
  border: 1px solid var(--rule);
  min-width: 100px;
}
.article-worksheet-badge {
  font-family: var(--display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.08em;
  color: var(--burgundy);
}
.article-worksheet-meta {
  font-family: var(--sans);
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-align: center;
}

@media (max-width: 640px) {
  .article-worksheet {
    grid-template-columns: 1fr;
    padding: 24px 22px;
  }
  .article-worksheet-r {
    flex-direction: row;
    justify-content: center;
  }
  .article-worksheet-h {
    font-size: 26px;
  }
}

/* ── The modal ────────────────────────────────────────────────── */
.dg-gate-modal {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.dg-gate-modal.is-open {
  display: flex;
  animation: dgGateIn 0.22s ease both;
}
.dg-gate-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(50, 2, 2, 0.78);
  cursor: pointer;
  -webkit-backdrop-filter: blur(3px);
  backdrop-filter: blur(3px);
}
.dg-gate-panel {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 480px;
  background: var(--paper);
  border-left: 4px solid var(--gold);
  padding: 44px 38px 32px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.42);
  animation: dgGatePanelIn 0.3s cubic-bezier(.2,.7,.3,1) both;
}
.dg-gate-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: transparent;
  border: 0;
  font-size: 30px;
  line-height: 1;
  color: var(--ink-faint);
  cursor: pointer;
  padding: 6px 10px;
  transition: color 0.15s;
}
.dg-gate-close:hover {
  color: var(--burgundy);
}
.dg-gate-eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--copper);
  padding-bottom: 6px;
  border-bottom: 1px solid var(--copper);
  margin-bottom: 16px;
}
.dg-gate-h {
  font-family: var(--display);
  font-size: 26px;
  font-weight: 600;
  line-height: 1.15;
  color: var(--burgundy);
  margin-bottom: 12px;
  letter-spacing: 0.005em;
}
.dg-gate-h em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--copper);
}
.dg-gate-p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 17px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 22px;
}
.dg-gate-p em {
  color: var(--burgundy);
}
.dg-gate-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 6px;
}
.dg-gate-form input {
  font-family: var(--sans);
  font-size: 16px;
  padding: 16px 18px;
  background: var(--paper-soft);
  border: 1px solid var(--rule);
  color: var(--ink);
  outline: none;
  transition: border-color 0.2s, background 0.2s;
}
.dg-gate-form input:focus {
  border-color: var(--burgundy);
  background: #fff;
}
.dg-gate-form button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font-family: var(--display);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  padding: 16px 22px;
  background: var(--burgundy);
  color: var(--ivory);
  border: 1px solid var(--burgundy);
  cursor: pointer;
  transition: all 0.22s;
}
.dg-gate-form button:hover:not(:disabled) {
  background: var(--gold);
  border-color: var(--gold);
  color: var(--burgundy-dark);
}
.dg-gate-form button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}
.dg-gate-msg {
  display: block;
  font-family: var(--sans);
  font-size: 13px;
  color: var(--ink-soft);
  min-height: 18px;
  margin-top: 4px;
}
.dg-gate-msg.is-error {
  color: #B0151A;
  font-weight: 600;
}

.dg-gate-step-success {
  text-align: center;
}
.dg-gate-check {
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 50%;
  background: var(--gold);
  color: var(--burgundy-dark);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.dg-gate-check svg {
  width: 28px;
  height: 28px;
}
.dg-gate-redo {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--copper);
  border-bottom: 1px solid var(--copper);
  padding-bottom: 2px;
  margin-top: 6px;
  cursor: pointer;
}
.dg-gate-redo em {
  font-family: var(--serif);
  font-style: italic;
  text-transform: none;
  letter-spacing: 0;
  color: inherit;
}
.dg-gate-redo:hover {
  color: var(--burgundy);
  border-bottom-color: var(--burgundy);
}

body.dg-gate-locked {
  overflow: hidden;
}

@keyframes dgGateIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes dgGatePanelIn {
  from { opacity: 0; transform: translateY(18px) scale(0.985); }
  to   { opacity: 1; transform: translateY(0)    scale(1); }
}

@media (max-width: 520px) {
  .dg-gate-panel { padding: 38px 24px 28px; }
  .dg-gate-h     { font-size: 22px; }
  .dg-gate-p     { font-size: 16px; }
}

/* ── Success-state Collective upsell ─────────────────────────── */
.dg-gate-upsell {
  margin-top: 26px;
  padding: 22px 22px 20px;
  background: var(--paper-soft);
  border-left: 3px solid var(--gold);
  text-align: left;
}
.dg-gate-upsell-eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--copper);
  padding-bottom: 4px;
  border-bottom: 1px solid var(--copper);
  margin-bottom: 12px;
}
.dg-gate-upsell-h {
  font-family: var(--display);
  font-size: 18px;
  font-weight: 600;
  line-height: 1.2;
  color: var(--burgundy);
  margin-bottom: 8px;
  letter-spacing: 0.005em;
}
.dg-gate-upsell-h em {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 500;
  color: var(--copper);
}
.dg-gate-upsell-p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 14px;
  line-height: 1.5;
  color: var(--ink-soft);
  margin-bottom: 14px;
}
.dg-gate-upsell-p strong { color: var(--burgundy); font-style: normal; font-weight: 600; }
.dg-gate-upsell-btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  padding: 13px 22px;
  background: var(--burgundy);
  color: var(--ivory);
  border: 1px solid var(--burgundy);
  transition: all 0.2s;
  margin-right: 14px;
  text-decoration: none;
}
.dg-gate-upsell-btn:hover {
  background: var(--gold);
  color: var(--burgundy-dark);
  border-color: var(--gold);
}
.dg-gate-upsell-soft {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--ink-faint);
  text-decoration: none;
  border-bottom: 1px solid var(--ink-faint);
  padding-bottom: 2px;
  transition: color 0.2s, border-color 0.2s;
}
.dg-gate-upsell-soft:hover { color: var(--burgundy); border-bottom-color: var(--burgundy); }
