/* explain.css — Document Helper page (clean-premium). */

.wg-dexp { max-width: 880px; margin: 0 auto; padding: 16px; }
.wg-dexp-head h1 { margin: 8px 0 4px; }
.wg-dexp-sub { color: var(--wg-muted, #667); margin: 0 0 18px; }

.wg-dexp-gate { padding: 22px; text-align: center; }
.wg-dexp-gate-btns { display: flex; gap: 10px; justify-content: center; margin-top: 12px; }

.wg-dexp-input { padding: 18px; display: flex; flex-direction: column; gap: 14px; }
.wg-dexp-drop {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  border: 2px dashed var(--wg-border, #d6d9e0); border-radius: 14px;
  padding: 24px 16px; text-align: center;
  transition: border-color .2s var(--wg-ease-out, ease), background .2s var(--wg-ease-out, ease);
}
.wg-dexp-drop:focus-within { border-color: var(--wg-accent, #0eaf4c); background: #f6fbf7; }
.wg-dexp-picked {
  max-width: min(260px, 100%); max-height: 320px; object-fit: contain;
  border-radius: 10px; box-shadow: 0 2px 12px rgba(0, 0, 0, .16);
}
.wg-dexp-pickbtns { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.wg-dexp-drop-icon { font-size: 34px; }
.wg-dexp-drop-label { font-weight: 600; }
.wg-dexp-drop-hint { font-size: .82rem; color: var(--wg-muted, #667); }
.wg-dexp-hint-field input { width: 100%; }

.wg-dexp-cols { display: grid; grid-template-columns: minmax(220px, 340px) 1fr; gap: 14px; align-items: start; }
@media (max-width: 720px) { .wg-dexp-cols { grid-template-columns: 1fr; } }

.wg-dexp-photo { padding: 10px; margin: 0; }
.wg-dexp-photo img { width: 100%; border-radius: 10px; display: block; }
.wg-dexp-photo figcaption { font-size: .8rem; color: var(--wg-muted, #667); text-align: center; padding-top: 6px; }

.wg-dexp-out { padding: 18px; min-height: 160px; }
.wg-dexp-out h2 { margin: 0 0 6px; font-size: 1.05rem; }
.wg-dexp-out h3 { margin: 16px 0 6px; font-size: .95rem; }
.wg-dexp-kind { font-size: .85rem; margin-bottom: 10px; }
.wg-dexp-kind span { color: var(--wg-muted, #667); margin-right: 6px; }
.wg-dexp-summary { margin: 0; }

.wg-dexp-action {
  border-left: 3px solid var(--wg-accent, #0eaf4c);
  background: #f4faf5; border-radius: 0 10px 10px 0;
  padding: 10px 12px; margin-top: 14px;
}
.wg-dexp-action h3 { margin: 0 0 4px; }
.wg-dexp-action p { margin: 0; }

.wg-dexp-facts { display: grid; gap: 6px; margin: 0; }
.wg-dexp-facts > div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px dotted var(--wg-border, #e3e5ea); padding-bottom: 4px; }
.wg-dexp-facts dt { color: var(--wg-muted, #667); }
.wg-dexp-facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.wg-dexp-sec { margin-bottom: 12px; }
.wg-dexp-sec blockquote {
  margin: 0 0 4px; padding: 6px 10px; border-left: 3px solid var(--wg-border, #d6d9e0);
  background: #f7f8fa; border-radius: 0 8px 8px 0; font-size: .9rem; overflow-wrap: anywhere;
}
.wg-dexp-sec p { margin: 0; }

.wg-dexp-working { color: var(--wg-muted, #667); }
.wg-dexp-err { color: #b3261e; }
.wg-dexp-unreadable { color: var(--wg-muted, #667); }
.wg-dexp-result > .wg-btn { margin-top: 14px; }

.wg-dexp-disclaimer {
  margin: 22px 0 8px; font-size: .8rem; color: var(--wg-muted, #667);
  border-top: 1px solid var(--wg-border, #e3e5ea); padding-top: 12px;
}

/* Reading overlay — fixed, above everything, not dismissable while busy. */
.wg-dexp-loading {
  position: fixed; inset: 0; z-index: 4000;
  display: flex; align-items: center; justify-content: center;
  background: rgba(12, 18, 30, .55); backdrop-filter: blur(3px);
  padding: 24px;
}
.wg-dexp-loading-card {
  background: #fff; border-radius: 18px; padding: 26px 24px;
  max-width: 340px; width: 100%; text-align: center;
  box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
}
.wg-dexp-loading-title { margin: 14px 0 6px; font-weight: 700; }
.wg-dexp-loading-stay { margin: 0; font-size: .85rem; color: var(--wg-muted, #667); }
.wg-dexp-loading-patience {
  margin: 10px 0 0; font-size: .85rem; font-weight: 600; color: var(--wg-accent, #2f7d5b);
  animation: wg-dexp-patience-in .3s var(--wg-ease-out, ease);
}
@keyframes wg-dexp-patience-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .wg-dexp-loading-patience { animation: none; } }
.wg-dexp-spinner {
  width: 42px; height: 42px; margin: 0 auto; border-radius: 50%;
  border: 4px solid #e4e8ef; border-top-color: var(--wg-accent, #0eaf4c);
  animation: wg-dexp-spin 0.9s linear infinite;
}
@keyframes wg-dexp-spin { to { transform: rotate(360deg); } }
.wg-dexp-noscroll { overflow: hidden; }

@media (prefers-reduced-motion: reduce) {
  .wg-dexp-drop { transition: none; }
  .wg-dexp-spinner { animation-duration: 2.5s; }
}

/* Save bar + the encrypted vault */
.wg-dexp-savebar { margin-top: 14px; padding: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.wg-dexp-savebar input { flex: 1 1 220px; }
.wg-dexp-save-note { flex-basis: 100%; font-size: .78rem; color: var(--wg-muted, #667); }
.wg-dexp-savedlink { align-self: center; font-size: .85rem; }
.wg-dexp-saved-head, .wg-dexp-saved-viewhead { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 6px 0 12px; }
.wg-dexp-saved-head h2 { margin: 0; font-size: 1.15rem; }
.wg-dexp-saved-viewhead h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.wg-dexp-saved-list { display: flex; flex-direction: column; gap: 8px; }
.wg-dexp-saved-item {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  text-align: left; font: inherit; cursor: pointer; background: #fff;
  border: 1px solid var(--wg-border, #e6e8ee); border-radius: 12px; padding: 12px 14px;
  transition: border-color .15s var(--wg-ease-out, ease);
}
.wg-dexp-saved-item:hover { border-color: var(--wg-accent, #0eaf4c); }
.wg-dexp-saved-item b { overflow-wrap: anywhere; }
.wg-dexp-saved-item span { font-size: .78rem; color: var(--wg-muted, #667); white-space: nowrap; }
@media (prefers-reduced-motion: reduce) { .wg-dexp-saved-item { transition: none; } }

/* TL;DR — the one-line gist, first and boldest thing in the result */
.wg-dexp-tldr {
  background: linear-gradient(180deg, #eafaf0, #f4fbf6);
  border: 1px solid #cde9d5; border-left: 4px solid var(--wg-accent, #0eaf4c);
  border-radius: 12px; padding: 12px 14px; margin-bottom: 14px;
}
.wg-dexp-tldr-tag {
  display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em;
  text-transform: uppercase; color: #0a7d37; margin-bottom: 4px;
}
.wg-dexp-tldr p { margin: 0; font-size: 1.02rem; font-weight: 600; line-height: 1.45; }

/* Clickable document annotations — numbered pins over the photo, linked to sections */
.wg-dexp-photo-stage { position: relative; display: block; }
.wg-dexp-pins { position: absolute; inset: 0; pointer-events: none; }
.wg-dexp-pin {
  position: absolute; transform: translate(-50%, -50%); pointer-events: auto;
  min-width: 26px; height: 26px; padding: 0 5px; border-radius: 999px;
  background: var(--wg-accent, #0eaf4c); color: #fff; border: 2px solid #fff;
  font: 700 .8rem/1 system-ui, sans-serif; cursor: pointer;
  box-shadow: 0 1px 6px rgba(0, 0, 0, .4); display: inline-flex; align-items: center; justify-content: center;
}
.wg-dexp-pin:hover { filter: brightness(1.08); }
.wg-dexp-pin-hint { font-size: .78rem; color: var(--wg-muted, #667); text-align: center; padding-top: 6px; }
.wg-dexp-sec.is-linked { position: relative; padding-left: 30px; cursor: pointer; border-radius: 8px; }
.wg-dexp-sec.is-linked:hover { background: #f4faf5; }
.wg-dexp-secnum {
  position: absolute; left: 0; top: 1px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--wg-accent, #0eaf4c); color: #fff; font: 700 .72rem/1 system-ui, sans-serif;
  display: inline-flex; align-items: center; justify-content: center;
}
@keyframes wg-dexp-flash {
  0%   { box-shadow: 0 0 0 0 rgba(14, 175, 76, .55); }
  100% { box-shadow: 0 0 0 14px rgba(14, 175, 76, 0); }
}
.wg-dexp-sec.is-flash, .wg-dexp-pin.is-flash { animation: wg-dexp-flash .9s ease-out; }
@media (prefers-reduced-motion: reduce) { .wg-dexp-sec.is-flash, .wg-dexp-pin.is-flash { animation: none; } }

/* How-to-pay card — amount, deadline, and the payment channels the doc lists */
.wg-dexp-pay {
  border: 1px solid #cfe6d6; background: #f4faf6; border-radius: 12px;
  padding: 12px 14px; margin-top: 14px;
}
.wg-dexp-pay h3 { margin: 0 0 8px; font-size: .95rem; }
.wg-dexp-pay-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.wg-dexp-pay-row > span { color: var(--wg-muted, #667); }
.wg-dexp-pay-row > b { text-align: right; overflow-wrap: anywhere; }
.wg-dexp-pay-ways { margin: 8px 0 4px; font-size: .8rem; font-weight: 700; color: #0a7d37; text-transform: uppercase; letter-spacing: .03em; }
.wg-dexp-pay-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.wg-dexp-pay-list li { display: flex; flex-direction: column; border-top: 1px dotted var(--wg-border, #dbe5de); padding-top: 6px; }
.wg-dexp-pay-list li b { font-size: .88rem; }
.wg-dexp-pay-list li span { font-size: .9rem; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

/* "How it works" link to the walkthrough */
.wg-dexp-howlink { display: inline-block; margin-top: 6px; font-size: .85rem; }
