/* =====================================================
   GROWTH MODULES: pagination, stars, newsletter, insights (blog),
   reviews and coupon box. Uses the tokens from nd-ui.css.
   ===================================================== */

/* ---------- pagination ---------- */
.nd-pager { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; margin: 36px 0 8px; font: 500 14px/1 var(--nd-font); }
.nd-pager__btn, .nd-pager__num { display: inline-grid; place-items: center; min-width: 42px; height: 42px; padding: 0 14px; border: 1px solid var(--nd-line); border-radius: 999px; background: #fff; color: var(--nd-ink); text-decoration: none; transition: border-color .2s, background-color .2s, color .2s; }
.nd-pager__num { padding: 0; }
.nd-pager a:hover { border-color: var(--nd-violet); color: var(--nd-violet); }
.nd-pager__num.is-on { background: var(--nd-ink); border-color: var(--nd-ink); color: #fff; }
.nd-pager__btn.is-off { opacity: .4; }
.nd-pager__gap { padding: 0 4px; color: var(--nd-faint); }
.nd-pager__info { flex-basis: 100%; text-align: center; margin-top: 8px; font-size: 12.5px; color: var(--nd-faint); font-weight: 400; }

/* ---------- stars ---------- */
.nd-stars { display: inline-flex; gap: 2px; vertical-align: middle; }
.nd-stars i { position: relative; width: 16px; height: 16px; background: #e3e6ee; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") center/contain no-repeat; }
.nd-stars i::after { content: ""; position: absolute; inset: 0; width: var(--f); background: #f5a524; }
.nd-stars--lg i { width: 22px; height: 22px; }

/* ---------- newsletter ---------- */
.nd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.nd-nl { position: relative; display: grid; gap: 22px; align-items: center; padding: clamp(24px, 4vw, 40px); border-radius: 28px; overflow: hidden; color: #fff; background: radial-gradient(70% 120% at 100% 0%, rgba(226, 72, 170, .35), transparent 60%), radial-gradient(60% 100% at 0% 100%, rgba(96, 196, 255, .25), transparent 60%), #0d0b14; }
@media (min-width: 900px) { .nd-nl { grid-template-columns: 1.1fr 1fr; gap: 40px; } }
.nd-nl__kick { display: inline-block; padding: 5px 12px; border-radius: 999px; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .16); font-size: 12px; letter-spacing: .04em; text-transform: uppercase; }
.nd-nl h2 { margin: 12px 0 8px; color: #fff !important; font-size: clamp(1.4rem, 2.6vw, 2rem); line-height: 1.15; font-weight: 500; letter-spacing: -.01em; }
.nd-nl p { margin: 0; color: rgba(255, 255, 255, .7) !important; font-size: 15px; line-height: 1.6; }
.nd-nl__form { position: relative; display: flex; flex-wrap: wrap; gap: 10px; }
.nd-nl__form input[type=email] { flex: 1 1 220px; min-width: 0; height: 52px; padding: 0 20px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .08); color: #fff; font: 400 15px var(--nd-font); outline: none; transition: border-color .2s, background-color .2s; }
.nd-nl__form input[type=email]::placeholder { color: rgba(255, 255, 255, .45); }
.nd-nl__form input[type=email]:focus { border-color: #c1b1f9; background: rgba(255, 255, 255, .12); }
.nd-nl .nd-cta { background: #fff; color: var(--nd-ink) !important; box-shadow: none; }
.nd-nl .nd-cta:hover { color: var(--nd-ink) !important; }
.nd-nl__msg { flex-basis: 100%; min-height: 20px; font-size: 14px !important; }
.nd-nl__msg.is-ok { color: #86efac !important; }
.nd-nl__msg.is-err { color: #fca5a5 !important; }
.nd-nl--card { grid-template-columns: 1fr !important; gap: 18px; }
.nd-nl-wrap { margin: 0 0 8px; padding-top: 96px; }

/* ---------- message landing (subscribe confirm etc.) ---------- */
.nd-msgpage { display: grid; place-items: center; min-height: 72vh; padding: 150px 16px 60px; }
.nd-msgpage__card { width: min(560px, 100%); padding: 40px 28px; border-radius: 28px; background: #fff; border: 1px solid var(--nd-line); text-align: center; box-shadow: var(--nd-shadow-lg); }
.nd-msgpage__icon { display: grid; place-items: center; width: 72px; height: 72px; margin: 0 auto 18px; border-radius: 50%; background: linear-gradient(135deg, #34d399, #16a34a); color: #fff; font-size: 32px; }
.nd-msgpage__icon.is-bad { background: linear-gradient(135deg, #fb7185, #e11d48); }
.nd-msgpage h1 { margin: 0 0 10px; font-size: 28px; font-weight: 500; }
.nd-msgpage p { margin: 0 auto; max-width: 420px; color: var(--nd-muted); line-height: 1.6; }
.nd-msgpage__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* ---------- insights: list ---------- */
.ins { padding: 160px 0 40px; }
.ins-head { display: grid; gap: 22px; align-items: end; margin-bottom: 34px; }
@media (min-width: 900px) { .ins-head { grid-template-columns: 1.3fr 1fr; } }
.ins-head h1 { margin: 16px 0 12px; font-size: clamp(2.3rem, 5vw, 4rem); line-height: 1.04; letter-spacing: -.02em; font-weight: 500; }
.ins-head h1 em { font-style: normal; background: var(--nd-grad-soft); -webkit-background-clip: text; background-clip: text; color: transparent; }
.ins-head p { color: var(--nd-muted); font-size: 17px; line-height: 1.6; max-width: 560px; }
.ins-search { display: flex; gap: 8px; }
.ins-search input { flex: 1; min-width: 0; height: 50px; padding: 0 20px; border: 1px solid var(--nd-line); border-radius: 999px; background: #fff; font: 400 15px var(--nd-font); color: var(--nd-ink); outline: none; }
.ins-search input:focus { border-color: var(--nd-violet); box-shadow: 0 0 0 4px rgba(134, 79, 254, .12); }
.ins-search button { height: 50px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--nd-ink); color: #fff; font: 500 15px var(--nd-font); cursor: pointer; }
.ins-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 28px; }
.ins-tag { display: inline-flex; align-items: center; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--nd-line); background: #fff; color: var(--nd-ink); font-size: 13.5px; text-decoration: none; transition: border-color .2s, color .2s, background-color .2s; }
.ins-tag:hover { border-color: var(--nd-violet); color: var(--nd-violet); }
.ins-tag.is-on { background: var(--nd-ink); border-color: var(--nd-ink); color: #fff; }
.ins-grid { display: grid; gap: 22px; }
@media (min-width: 700px) { .ins-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1100px) { .ins-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.ins-card { display: flex; flex-direction: column; border-radius: 24px; overflow: hidden; background: #fff; border: 1px solid var(--nd-line); color: var(--nd-ink); text-decoration: none; transition: box-shadow .3s, border-color .3s; }
.ins-card:hover { box-shadow: var(--nd-shadow-lg); border-color: #d6c9fb; }
.ins-card__img { aspect-ratio: 16 / 9; overflow: hidden; background: var(--nd-soft); }
.ins-card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s var(--nd-ease); }
.ins-card:hover .ins-card__img img { transform: scale(1.04); }
.ins-card__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; flex: 1; }
.ins-card__meta { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 12.5px; color: var(--nd-faint); }
.ins-card h2, .ins-card h3 { margin: 0; font-size: 20px; line-height: 1.3; font-weight: 500; color: var(--nd-ink); }
.ins-card p { margin: 0; color: var(--nd-muted); font-size: 14.5px; line-height: 1.6; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.ins-card__more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 500; color: var(--nd-violet); }
.ins-card--feature { grid-column: 1 / -1; }
@media (min-width: 900px) { .ins-card--feature { flex-direction: row; } .ins-card--feature .ins-card__img { flex: 1.25; aspect-ratio: auto; min-height: 340px; } .ins-card--feature .ins-card__body { flex: 1; padding: 34px; justify-content: center; } .ins-card--feature h2 { font-size: 30px; } }
.ins-empty { padding: 60px 20px; text-align: center; border: 1px dashed var(--nd-line-2); border-radius: 24px; color: var(--nd-muted); }
.ins-pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--nd-violet-soft); color: var(--nd-violet); font-size: 12px; font-weight: 500; }

/* ---------- insights: article ---------- */
.art { padding: 150px 0 40px; }
.art-wrap { max-width: 1180px; margin: 0 auto; }
.art-crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--nd-faint); margin-bottom: 18px; }
.art-crumbs a { color: var(--nd-muted); text-decoration: none; }
.art-crumbs a:hover { color: var(--nd-violet); }
.art h1 { max-width: 900px; margin: 12px 0 16px; font-size: clamp(2rem, 4.4vw, 3.4rem); line-height: 1.08; letter-spacing: -.02em; font-weight: 500; }
.art-lead { max-width: 760px; font-size: 18.5px; line-height: 1.6; color: var(--nd-muted); margin: 0 0 22px; }
.art-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; font-size: 14px; color: var(--nd-muted); margin-bottom: 28px; }
.art-meta img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; }
.art-meta strong { color: var(--nd-ink); font-weight: 500; }
.art-cover { border-radius: 28px; overflow: hidden; margin-bottom: 40px; background: var(--nd-soft); aspect-ratio: 2 / 1; }
.art-cover img { width: 100%; height: 100%; object-fit: cover; }
.art-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 40px; }
.art-grid > * { min-width: 0; }
.art-author__links .nd-cta { max-width: 100%; }
@media (max-width: 520px) { .art-author { flex-direction: column; } }
@media (min-width: 1024px) { .art-grid { grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; } }
.art-toc { position: sticky; top: 110px; padding: 20px; border-radius: 20px; border: 1px solid var(--nd-line); background: #fff; font-size: 14px; }
.art-toc strong { display: block; margin-bottom: 10px; font-weight: 500; }
.art-toc ol { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.art-toc a { color: var(--nd-muted); text-decoration: none; line-height: 1.4; display: block; }
.art-toc a:hover, .art-toc a.is-on { color: var(--nd-violet); }
.art-toc .is-h3 { padding-left: 14px; font-size: 13px; }
.art-side { display: grid; gap: 18px; align-content: start; }
@media (max-width: 1023px) { .art-side { order: -1; } .art-toc { position: static; } .art-side .art-cta { display: none; } }
.art-cta { padding: 22px; border-radius: 20px; background: var(--nd-ink); color: #fff; }
.art-cta strong { display: block; font-size: 18px; font-weight: 500; margin-bottom: 6px; color: #fff; }
.art-cta p { margin: 0 0 14px; font-size: 14px; color: rgba(255, 255, 255, .7) !important; line-height: 1.55; }
.art-cta .nd-cta { background: #fff; color: var(--nd-ink) !important; height: 46px; font-size: 15px; box-shadow: none; }
.art-cta .nd-cta .nd-cta__icon { width: 46px; height: 38px; }

.art-body { font-size: 17.5px; line-height: 1.8; color: #2a2a31; min-width: 0; }
.art-body > * + * { margin-top: 1.1em; }
.art-body h2 { margin-top: 1.9em; font-size: 1.65em; line-height: 1.25; font-weight: 500; color: var(--nd-ink); scroll-margin-top: 110px; }
.art-body h3 { margin-top: 1.6em; font-size: 1.28em; line-height: 1.3; font-weight: 500; color: var(--nd-ink); scroll-margin-top: 110px; }
.art-body p, .art-body li { color: #2a2a31 !important; }
.art-body a { color: var(--nd-violet); text-decoration: underline; text-underline-offset: 3px; }
.art-body ul, .art-body ol { padding-left: 1.4em; }
.art-body ul { list-style: disc; }
.art-body ol { list-style: decimal; }
.art-body li + li { margin-top: .4em; }
.art-body img { max-width: 100%; height: auto; border-radius: 18px; }
.art-body figure figcaption { margin-top: 8px; font-size: 14px; color: var(--nd-faint); text-align: center; }
.art-body blockquote { margin-left: 0; padding: 18px 22px; border-left: 3px solid var(--nd-violet); border-radius: 0 16px 16px 0; background: var(--nd-violet-soft); font-size: 1.05em; }
.art-body pre { padding: 18px; border-radius: 16px; background: #0f0e17; color: #e9e7f5; font-size: 14px; line-height: 1.6; overflow-x: auto; }
.art-body code { padding: 2px 6px; border-radius: 6px; background: var(--nd-soft); font-size: .9em; }
.art-body pre code { padding: 0; background: none; }
.art-body table { width: 100%; border-collapse: collapse; font-size: 15px; display: block; overflow-x: auto; }
.art-body th, .art-body td { padding: 10px 12px; border: 1px solid var(--nd-line); text-align: left; }
.art-body hr { border: 0; border-top: 1px solid var(--nd-line); margin: 2em 0; }
.art-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-top: 40px; padding-top: 24px; border-top: 1px solid var(--nd-line); }
.art-share { display: flex; flex-wrap: wrap; gap: 8px; }
.art-share a, .art-share button { display: inline-flex; align-items: center; height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--nd-line); background: #fff; color: var(--nd-ink); font: 500 13px var(--nd-font); text-decoration: none; cursor: pointer; }
.art-share a:hover, .art-share button:hover { border-color: var(--nd-violet); color: var(--nd-violet); }
.art-author { display: flex; gap: 18px; align-items: flex-start; margin-top: 36px; padding: 24px; border-radius: 24px; background: #fff; border: 1px solid var(--nd-line); }
.art-author img { width: 64px; height: 64px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.art-author strong { display: block; font-size: 17px; font-weight: 500; }
.art-author p { margin: 6px 0 12px; color: var(--nd-muted); font-size: 14.5px; line-height: 1.6; }
.art-author__links { display: flex; flex-wrap: wrap; gap: 8px; }
.art-related { margin-top: 64px; }
.art-related h2 { font-size: 26px; font-weight: 500; margin: 0 0 20px; }
.art-progress { position: fixed; left: 0; top: 0; z-index: 60; height: 3px; width: 100%; transform-origin: 0 50%; transform: scaleX(0); background: var(--nd-grad); pointer-events: none; }

/* ---------- reviews on project pages ---------- */
.rv { margin-top: 28px; padding: clamp(20px, 3vw, 28px); border-radius: 24px; background: #fff; border: 1px solid var(--nd-line); }
.rv-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 18px; }
.rv-head h2 { margin: 0; font-size: 22px; font-weight: 500; }
.rv-score { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--nd-muted); }
.rv-score b { font-size: 28px; font-weight: 500; color: var(--nd-ink); }
.rv-list { display: grid; gap: 14px; }
.rv-item { padding: 16px 18px; border-radius: 18px; background: var(--nd-soft); }
.rv-item__top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; margin-bottom: 6px; font-size: 13px; color: var(--nd-faint); }
.rv-item__top strong { color: var(--nd-ink); font-size: 14.5px; font-weight: 500; }
.rv-badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; background: #dcfce7; color: #15803d; font-size: 11.5px; font-weight: 500; }
.rv-item h3 { margin: 4px 0; font-size: 15.5px; font-weight: 500; }
.rv-item p { margin: 0; font-size: 14.5px; line-height: 1.6; color: #3a3a42 !important; }
.rv-reply { margin-top: 10px; padding: 10px 14px; border-left: 3px solid var(--nd-violet); border-radius: 0 12px 12px 0; background: #fff; font-size: 14px; }
.rv-empty { color: var(--nd-muted); font-size: 14.5px; }
.rv-form { display: grid; gap: 12px; margin-top: 20px; padding-top: 20px; border-top: 1px dashed var(--nd-line-2); }
.rv-form h3 { margin: 0; font-size: 16px; font-weight: 500; }
.rv-rate { display: inline-flex; flex-direction: row-reverse; justify-content: flex-end; gap: 4px; }
.rv-rate input { position: absolute; opacity: 0; pointer-events: none; }
.rv-rate label { width: 30px; height: 30px; cursor: pointer; background: #e3e6ee; -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") center/contain no-repeat; mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m12 2.5 2.9 6 6.6.9-4.8 4.6 1.2 6.5L12 17.4l-5.9 3.1 1.2-6.5L2.5 9.4l6.6-.9z'/%3E%3C/svg%3E") center/contain no-repeat; transition: background-color .15s; }
.rv-rate input:checked ~ label, .rv-rate label:hover, .rv-rate label:hover ~ label { background: #f5a524; }
.rv-rate input:focus-visible + label { outline: 2px solid var(--nd-violet); outline-offset: 2px; }
.rv-form input[type=text], .rv-form textarea { width: 100%; padding: 12px 16px; border: 1px solid var(--nd-line); border-radius: 14px; background: #fff; font: 400 15px var(--nd-font); color: var(--nd-ink); outline: none; }
.rv-form textarea { min-height: 100px; resize: vertical; }
.rv-form input:focus, .rv-form textarea:focus { border-color: var(--nd-violet); box-shadow: 0 0 0 4px rgba(134, 79, 254, .12); }
.rv-form .nd-cta { justify-self: start; }
.rv-msg { font-size: 14px; }

/* ---------- coupon box (checkout) ---------- */
.co-coupon { display: flex; gap: 8px; margin: 10px 0 6px; }
.co-coupon input { flex: 1; min-width: 0; height: 44px; padding: 0 14px; border: 1px dashed var(--nd-line-2); border-radius: 12px; background: #fff; font: 500 14px var(--nd-font); letter-spacing: .06em; text-transform: uppercase; color: var(--nd-ink); outline: none; }
.co-coupon input:focus { border-style: solid; border-color: var(--nd-violet); }
.co-coupon button { height: 44px; padding: 0 16px; border: 0; border-radius: 12px; background: var(--nd-soft); color: var(--nd-ink); font: 500 14px var(--nd-font); cursor: pointer; }
.co-coupon button:hover { background: #e7eaf2; }
.co-coupon-msg { min-height: 18px; margin: 0 0 6px; font-size: 13px; }
.co-coupon-msg.is-ok { color: #15803d; }
.co-coupon-msg.is-err { color: #b91c1c; }
.co-row--disc span:last-child { color: #15803d; font-weight: 500; }

@media (prefers-reduced-motion: reduce) { .ins-card__img img, .ins-card { transition: none; } }
.art-meta img, .art-author img { object-position: top center; }
.nd-nl-wrap + .grid { padding-top: 72px !important; }
