/* Writing tools (front end + editor canvas): button/note/step styles, patterns, link cards. */
:root{--nk-brand:var(--brand,#1f3c66);--nk-brand-2:#2f6bc0;--nk-ink:#1b2230;--nk-muted:#6b7280;--nk-line:#e3e7ee}

/* Download button */
body .wp-block-button.is-style-nk-download .wp-block-button__link,
body .ghostkit-button,body .tb-button__link{display:inline-flex;align-items:center;justify-content:center;gap:10px;padding:14px 26px 14px 22px;border:0;border-radius:12px;background:linear-gradient(135deg,var(--nk-brand),var(--nk-brand-2));color:#fff;font-weight:800;font-size:16px;line-height:1.2;letter-spacing:-.01em;text-decoration:none;box-shadow:0 8px 20px -8px rgba(31,60,102,.55),inset 0 1px 0 rgba(255,255,255,.18);transition:transform .15s,box-shadow .15s,filter .15s}
body .wp-block-button.is-style-nk-download .wp-block-button__link:before{content:"";width:20px;height:20px;flex:none;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19.5h14'/%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' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19.5h14'/%3E%3C/svg%3E") center/contain no-repeat}
body .wp-block-button.is-style-nk-download .wp-block-button__link:hover,body .ghostkit-button:hover,body .tb-button__link:hover{transform:translateY(-2px);box-shadow:0 14px 26px -10px rgba(31,60,102,.6),inset 0 1px 0 rgba(255,255,255,.18);color:#fff;filter:brightness(1.06)}
body .wp-block-button.is-style-nk-ghost .wp-block-button__link{display:inline-flex;align-items:center;gap:8px;padding:13px 22px;border:1.5px solid var(--nk-line);border-radius:12px;background:#fff;color:var(--nk-ink);font-weight:700;font-size:15px;line-height:1.2;text-decoration:none;transition:border-color .15s,color .15s,background .15s}
body .wp-block-button.is-style-nk-ghost .wp-block-button__link:after{content:"↗";font-size:.95em;opacity:.6}
body .wp-block-button.is-style-nk-ghost .wp-block-button__link:hover{border-color:var(--nk-brand);color:var(--nk-brand);background:#f5f8fd}
.wp-block-buttons:has(.is-style-nk-download,.is-style-nk-ghost){gap:10px;margin:1.4em 0}

/* Notes */
.wp-block-group:is(.is-style-nk-info,.is-style-nk-warning,.is-style-nk-tip){--tone:#2563eb;--tint:#eff5ff;--edge:#d4e3ff;position:relative;margin:1.6em 0;padding:18px 20px 18px 62px;border:1px solid var(--edge);border-radius:14px;background:var(--tint);font-size:.96em;line-height:1.7}
.wp-block-group.is-style-nk-warning{--tone:#d97706;--tint:#fff8eb;--edge:#fbe3b6}
.wp-block-group.is-style-nk-tip{--tone:#059669;--tint:#effaf5;--edge:#c9eedd}
.wp-block-group:is(.is-style-nk-info,.is-style-nk-warning,.is-style-nk-tip):before{content:"";position:absolute;left:18px;top:18px;width:30px;height:30px;border-radius:50%;background:var(--tone) var(--nk-icon) center/18px no-repeat;box-shadow:0 4px 10px -4px var(--tone)}
.wp-block-group.is-style-nk-info{--nk-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 11v6M12 7.2v.1'/%3E%3C/svg%3E")}
.wp-block-group.is-style-nk-warning{--nk-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2.6' stroke-linecap='round'%3E%3Cpath d='M12 6.5v7M12 17.5v.1'/%3E%3C/svg%3E")}
.wp-block-group.is-style-nk-tip{--nk-icon:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M9 18h6M10 21h4M12 3a6 6 0 0 0-3.5 10.9c.6.4 1 1.1 1 1.9V16h5v-.2c0-.8.4-1.5 1-1.9A6 6 0 0 0 12 3z'/%3E%3C/svg%3E")}
.wp-block-group:is(.is-style-nk-info,.is-style-nk-warning,.is-style-nk-tip) :is(p,ul,ol,figure,h2,h3,h4){margin:0 0 .5em}
.wp-block-group:is(.is-style-nk-info,.is-style-nk-warning,.is-style-nk-tip) :is(p,ul,ol,figure,h2,h3,h4):last-child{margin-bottom:0}
.wp-block-group:is(.is-style-nk-info,.is-style-nk-warning,.is-style-nk-tip) p:first-child>strong:only-child{color:var(--tone);font-size:1.03em}

/* Download box */
.wp-block-group.is-style-nk-download-box{position:relative;overflow:hidden;margin:1.8em 0;padding:24px 26px;border:1px solid #d9e3f2;border-radius:16px;background:radial-gradient(120% 140% at 100% 0,#e7effc 0,#f7f9fd 45%,#fff 100%)}
.wp-block-group.is-style-nk-download-box:after{content:"";position:absolute;right:-18px;top:-18px;width:120px;height:120px;opacity:.07;background:var(--nk-brand);-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19.5h14'/%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' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 4v11m0 0-4.5-4.5M12 15l4.5-4.5M5 19.5h14'/%3E%3C/svg%3E") center/contain no-repeat;pointer-events:none}
body .wp-block-group.is-style-nk-download-box :is(h2,h3,h4){margin:0 0 4px;padding:0;border:0;font-size:20px;color:var(--nk-ink)}
.wp-block-group.is-style-nk-download-box p{margin:0 0 14px;color:var(--nk-muted);font-size:14px}
.wp-block-group.is-style-nk-download-box .wp-block-buttons{margin:0}

/* Steps */
ol.is-style-nk-steps{list-style:none;counter-reset:nk-step;margin:1.6em 0;padding:0}
ol.is-style-nk-steps>li{counter-increment:nk-step;position:relative;margin:0;padding:2px 0 22px 52px}
ol.is-style-nk-steps>li:before{content:counter(nk-step);position:absolute;left:0;top:0;width:34px;height:34px;border-radius:50%;background:linear-gradient(135deg,var(--nk-brand),var(--nk-brand-2));color:#fff;font-weight:800;font-size:15px;display:flex;align-items:center;justify-content:center;box-shadow:0 6px 14px -6px rgba(31,60,102,.6)}
ol.is-style-nk-steps>li:not(:last-child):after{content:"";position:absolute;left:16px;top:38px;bottom:4px;width:2px;background:linear-gradient(var(--nk-line),transparent)}
ol.is-style-nk-steps>li>strong:first-child{display:block;color:var(--nk-ink);font-size:1.05em}

/* Link cards (link card block + old Visual Link Preview blocks) */
body a.link-card{position:relative;display:flex;align-items:stretch;margin:1.6em 0;border:1px solid var(--nk-line);border-radius:14px;overflow:hidden;background:#fff;color:inherit;text-decoration:none;box-shadow:0 1px 2px rgba(16,24,40,.04);transition:border-color .15s,box-shadow .2s,transform .2s}
body a.link-card:hover{border-color:#c7d4e8;box-shadow:0 12px 28px -14px rgba(20,32,60,.35);transform:translateY(-2px);color:inherit}
.link-card-image{position:relative;flex:0 0 220px;min-height:124px;background:#f1f4f9;overflow:hidden}
body .link-card-image img{position:absolute;inset:0;display:block;width:100%;height:100%;max-width:none;object-fit:cover;border-radius:0;transition:transform .35s}
a.link-card:hover .link-card-image img{transform:scale(1.04)}
.link-card-body{display:flex;flex-direction:column;gap:6px;min-width:0;flex:1;padding:16px 48px 16px 20px}
.link-card-body strong{font-size:16px;line-height:1.45;color:var(--nk-ink);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.link-card-summary{font-size:14px;line-height:1.6;color:var(--nk-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}
.link-card-host{margin-top:auto;display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:700;color:var(--nk-brand);letter-spacing:.01em}
.link-card-host:before{content:"";width:12px;height:12px;background:currentColor;-webkit-mask:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%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' fill='none' stroke='black' stroke-width='2.4' stroke-linecap='round'%3E%3Cpath d='M10 14a4 4 0 0 0 5.7 0l3-3a4 4 0 0 0-5.7-5.7l-1 1M14 10a4 4 0 0 0-5.7 0l-3 3a4 4 0 0 0 5.7 5.7l1-1'/%3E%3C/svg%3E") center/contain no-repeat}
.link-card-arrow{position:absolute;right:16px;top:50%;width:28px;height:28px;margin-top:-14px;border-radius:50%;background:#f1f4f9;color:var(--nk-brand);display:flex;align-items:center;justify-content:center;font-size:14px;font-weight:800;transition:background .15s,color .15s,transform .2s}
a.link-card:hover .link-card-arrow{background:var(--nk-brand);color:#fff;transform:translateX(2px)}
.nk-link-card-form{display:flex;gap:8px;width:100%;max-width:560px}

@media (max-width:600px){
  body a.link-card{flex-direction:column}
  .link-card-image{flex-basis:auto;min-height:0;aspect-ratio:1.91/1}
  .link-card-body{padding:14px 16px 16px}
  .link-card-arrow{display:none}
  .wp-block-group:is(.is-style-nk-info,.is-style-nk-warning,.is-style-nk-tip){padding:16px 16px 16px 56px}
  .wp-block-group.is-style-nk-download-box{padding:20px 18px}
  .wp-block-group.is-style-nk-download-box .wp-block-button{flex:1 1 100%}
  .wp-block-group.is-style-nk-download-box .wp-block-button__link{width:100%}
}
