/* i2B redesign — shared styles (page layout lives in inline styles) */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: #ffffff; font-family: Inter, system-ui, -apple-system, "Segoe UI", sans-serif; color: #0F172A; }
img { max-width: 100%; height: auto; }

a { color: #0A6E63; }
a:hover { color: #084F48; }

.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: #fff; padding: 8px 12px; z-index: 50; }

:focus-visible { outline: 3px solid #2DD4BF; outline-offset: 2px; }

/* header */
.navlink, button[data-menu] { color: #ffffff; }
.navlink:hover, button[data-menu]:hover { color: #5EEAD4 !important; }
.menulink:hover strong { color: #0A6E63; }
.menu-panel[hidden] { display: none; }
button[data-menu] svg { transition: transform .15s ease; }
button[data-menu][aria-expanded="true"] svg { transform: rotate(180deg); }
button[data-menu][aria-expanded="true"] { color: #5EEAD4 !important; }

/* footer */
.foot a { color: #ffffff; }
.foot a:hover { color: #5EEAD4 !important; }

/* cards */
.card-link:hover h3, .post:hover h3, .cap:hover h3 { color: #0A6E63 !important; }

/* FAQ */
.faq-nav { display: block; padding: 12px 16px; border-radius: 10px; background: #F6F8FB; color: #0B1F3A; text-decoration: none; font-size: 15px; min-height: 44px; }
.faq-nav:hover { background: #0B1F3A; color: #ffffff; }
.faq-group { margin: 32px 0 8px; font-family: Manrope, sans-serif; font-weight: 800; font-size: 28px; color: #0B1F3A; scroll-margin-top: 24px; }
.faq-group:first-of-type { margin-top: 0; }
.faq-item { border: 1px solid #E2E8F0; border-radius: 14px; overflow: hidden; }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 24px; font-size: 17px; font-weight: 600; color: #0B1F3A; min-height: 44px; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; font-size: 22px; color: #0A6E63; }
.faq-item[open] summary::after { content: "−"; }
.faq-item p { margin: 0; padding: 0 24px 22px; font-size: 16px; line-height: 1.7; color: #334155; }

/* comparison toggle */
.size-btn { height: 44px; padding: 0 16px; border-radius: 8px; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; background: transparent; color: #ffffff; border: 1px solid #5B7397; }
.size-btn.is-active { background: #2DD4BF; color: #0B1F3A; border-color: #2DD4BF; }

/* forms */
input, textarea, select, button { font: inherit; }
input:focus, textarea:focus { border-color: #0A6E63 !important; outline: none; box-shadow: 0 0 0 3px rgba(45, 212, 191, .35); }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; } }

/* homepage hero scene: on phones show just the dashboard */
@media (max-width: 640px) {
  .hero-float { display: none !important; }
  .hero-visual { min-height: 0 !important; }
  .hero-visual > div { position: static !important; }
}

/* blog: posts beyond the first batch stay in the page for search engines but hidden until "Load more" */
.post[hidden] { display: none !important; }

/* ===== Dark theme (toggle in the header; choice saved per visitor, defaults to the device setting) ===== */
html[data-theme="dark"] { color-scheme: dark; }
html[data-theme="dark"] body { background: #0F1A2A; color: #E6EDF7; }
html[data-theme="dark"] a { color: #5EEAD4; }
html[data-theme="dark"] a:hover { color: #99F6E4; }
html[data-theme="dark"] [style*="background: #ffffff" i] { background-color: #0F1A2A !important; }
html[data-theme="dark"] [style*="background: #F6F8FB" i] { background-color: #132033 !important; }
html[data-theme="dark"] [style*="background: #F1F5F9" i] { background-color: #1A2940 !important; }
html[data-theme="dark"] [style*="background: #EEF2F6" i] { background-color: #1A2940 !important; }
html[data-theme="dark"] [style*="background: #E8EEF7" i] { background-color: #1A2940 !important; }
html[data-theme="dark"] [style*="background: #E2E8F0" i] { background-color: #22395E !important; }
html[data-theme="dark"] [style*="background: #E6FAF6" i] { background-color: #0E2C2A !important; }
html[data-theme="dark"] [style*="background: #CCFBF1" i] { background-color: #0E3B36 !important; }
html[data-theme="dark"] [style*="background: #FEF3C7" i] { background-color: #3A2E0B !important; }
html[data-theme="dark"] [style*="background: #DBEAFE" i] { background-color: #172A4D !important; }
html[data-theme="dark"] [style*="background: #99F6E4" i] { background-color: #0E5F55 !important; }
html[data-theme="dark"] [style*="; color: #0B1F3A" i], html[data-theme="dark"] [style^="color: #0B1F3A" i] { color: #E6EDF7 !important; }
html[data-theme="dark"] [style*="; color: #0F172A" i], html[data-theme="dark"] [style^="color: #0F172A" i] { color: #E6EDF7 !important; }
html[data-theme="dark"] [style*="; color: #334155" i], html[data-theme="dark"] [style^="color: #334155" i] { color: #C7D3E3 !important; }
html[data-theme="dark"] [style*="; color: #475569" i], html[data-theme="dark"] [style^="color: #475569" i] { color: #9FB0C8 !important; }
html[data-theme="dark"] [style*="; color: #0A6E63" i], html[data-theme="dark"] [style^="color: #0A6E63" i] { color: #5EEAD4 !important; }
html[data-theme="dark"] [style*="; color: #0A5249" i], html[data-theme="dark"] [style^="color: #0A5249" i] { color: #5EEAD4 !important; }
html[data-theme="dark"] [style*="; color: #7A4B00" i], html[data-theme="dark"] [style^="color: #7A4B00" i] { color: #FCD34D !important; }
html[data-theme="dark"] [style*="; color: #1E3A8A" i], html[data-theme="dark"] [style^="color: #1E3A8A" i] { color: #93C5FD !important; }
html[data-theme="dark"] [style*="; color: #1E3A5F" i], html[data-theme="dark"] [style^="color: #1E3A5F" i] { color: #C7D3E3 !important; }
html[data-theme="dark"] [style*="solid #E2E8F0" i] { border-color: #22395E !important; }
html[data-theme="dark"] [style*="solid #EEF2F6" i] { border-color: #1C3152 !important; }
html[data-theme="dark"] [style*="solid #CBD5E1" i] { border-color: #2B4268 !important; }
html[data-theme="dark"] [style*="solid #0B1F3A" i] { border-color: #5B7397 !important; }
/* dark text stays on bright teal buttons and chips */
html[data-theme="dark"] [style*="background: #2DD4BF" i], html[data-theme="dark"] [style*="background: #5EEAD4" i] { color: #0B1F3A !important; }
/* navy fills inside drawn product panels become slate so they stay visible */
html[data-theme="dark"] [aria-hidden="true"] [style*="background: #0B1F3A" i], html[data-theme="dark"] [role="img"] [style*="background: #0B1F3A" i] { background-color: #3A5277 !important; }
/* logos and review badges are drawn for light backgrounds */
html[data-theme="dark"] img[src*="capterra"], html[data-theme="dark"] img[src*="softwareadvice"], html[data-theme="dark"] img[src*="Logos-Website"] { background: #ffffff; border-radius: 8px; padding: 6px; }
html[data-theme="dark"] input, html[data-theme="dark"] textarea, html[data-theme="dark"] select { background-color: #132033 !important; color: #E6EDF7 !important; }
html[data-theme="dark"] input::placeholder, html[data-theme="dark"] textarea::placeholder { color: #9FB0C8; }
html[data-theme="dark"] .faq-nav { background: #132033; color: #E6EDF7; }
html[data-theme="dark"] .faq-nav:hover { background: #2DD4BF; color: #0B1F3A; }
html[data-theme="dark"] .faq-group, html[data-theme="dark"] .faq-item summary { color: #E6EDF7; }
html[data-theme="dark"] .faq-item { border-color: #22395E; }
html[data-theme="dark"] .faq-item p { color: #C7D3E3; }
html[data-theme="dark"] .faq-item summary::after { color: #5EEAD4; }
html[data-theme="dark"] .card-link:hover h3, html[data-theme="dark"] .post:hover h3, html[data-theme="dark"] .cap:hover h3 { color: #5EEAD4 !important; }
/* toggle icon */
html[data-theme="dark"] #theme-toggle .icon-moon { display: none !important; }
html[data-theme="dark"] #theme-toggle .icon-sun { display: block !important; }
#theme-toggle:hover { border-color: #5EEAD4 !important; color: #5EEAD4 !important; }
html[data-theme="dark"] polygon[fill="#CCFBF1"] { fill: #0E5F55; }
html[data-theme="dark"] circle[fill="#0A6E63"] { fill: #2DD4BF; }

/* ===== Blog posts and migrated pages (content written in Markdown or exported from WordPress) ===== */
.post-body { display: flex; flex-direction: column; gap: 20px; font-size: 18px; line-height: 1.75; color: #334155; }
.post-body > * { margin: 0; }
.post-body h2 { font-family: Manrope, sans-serif; font-weight: 800; font-size: 28px; line-height: 1.2; color: #0B1F3A; margin-top: 16px; }
.post-body h3 { font-family: Manrope, sans-serif; font-weight: 700; font-size: 22px; line-height: 1.3; color: #0B1F3A; margin-top: 8px; }
.post-body h4 { font-family: Manrope, sans-serif; font-weight: 700; font-size: 18px; color: #0B1F3A; }
.post-body ul, .post-body ol { padding-left: 24px; display: flex; flex-direction: column; gap: 6px; }
.post-body img { display: block; max-width: 100%; height: auto; border-radius: 14px; }
.post-body figure { display: flex; flex-direction: column; gap: 8px; }
.post-body figcaption { font-size: 14px; color: #475569; }
.post-body blockquote { padding: 18px 22px; border-radius: 12px; background: #F6F8FB; color: #0B1F3A; font-weight: 500; }
.post-body blockquote > * { margin: 0; }
.post-body hr { border: 0; border-top: 1px solid #E2E8F0; width: 100%; }
.post-body table { width: 100%; border-collapse: collapse; font-size: 16px; display: block; overflow-x: auto; }
.post-body th, .post-body td { padding: 12px 16px; border-top: 1px solid #E2E8F0; text-align: left; vertical-align: top; }
.post-body th { background: #0B1F3A; color: #ffffff; }
.post-body iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: 14px; }
.post-body code { background: #F1F5F9; padding: 2px 6px; border-radius: 6px; font-size: .9em; }
.post-tags { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 14px; border-top: 1px solid #E2E8F0; padding-top: 24px; margin-top: 12px; }
.post-tags a { background: #F1F5F9; padding: 6px 12px; border-radius: 999px; text-decoration: none; }
.post-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 16px; }
.post-nav a { border: 1px solid #E2E8F0; border-radius: 14px; padding: 20px; text-decoration: none; display: flex; flex-direction: column; gap: 6px; }
.post-nav a span { font-size: 13px; color: #475569; }
.post-nav a strong { font-family: Manrope, sans-serif; font-size: 16px; line-height: 1.35; color: #0B1F3A; }
.post-nav a:last-child:not(:first-child) { text-align: right; }
html[data-theme="dark"] .post-body { color: #C7D3E3; }
html[data-theme="dark"] .post-body h2, html[data-theme="dark"] .post-body h3, html[data-theme="dark"] .post-body h4,
html[data-theme="dark"] .post-nav a strong { color: #E6EDF7; }
html[data-theme="dark"] .post-body blockquote { background: #132033; color: #E6EDF7; }
html[data-theme="dark"] .post-body hr, html[data-theme="dark"] .post-body th, html[data-theme="dark"] .post-body td,
html[data-theme="dark"] .post-tags, html[data-theme="dark"] .post-nav a { border-color: #22395E; }
html[data-theme="dark"] .post-tags a, html[data-theme="dark"] .post-body code { background: #1A2940; }
html[data-theme="dark"] .post-body figcaption, html[data-theme="dark"] .post-nav a span { color: #9FB0C8; }

/* ===== Forms ===== */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; padding: 14px 16px; border-radius: 10px; font-size: 15px; font-weight: 500; }
.form-status[hidden] { display: none; }
.form-status.is-error { background: #FEE2E2; color: #991B1B; }
.form-status.is-ok { background: #CCFBF1; color: #0A5249; }
.form-done { display: flex; flex-direction: column; gap: 10px; padding: 8px 0; }
.form-done strong { font-family: Manrope, sans-serif; font-size: 22px; color: #0B1F3A; }
form[data-form] button[type="submit"][disabled] { opacity: .6; cursor: progress; }
form[data-form] .field-error { border-color: #B91C1C !important; }
.cf-turnstile { min-height: 65px; }
html[data-theme="dark"] .form-status.is-error { background: #3B1212; color: #FCA5A5; }
html[data-theme="dark"] .form-status.is-ok { background: #0E3B36; color: #5EEAD4; }
html[data-theme="dark"] .form-done strong { color: #E6EDF7; }

/* ===== forms (all post to /api/form.ashx) ===== */
.hp-field { position: absolute !important; left: -10000px !important; width: 1px; height: 1px; overflow: hidden; }
.form-status { margin: 0; padding: 12px 14px; border-radius: 8px; font-size: 15px; }
.form-status.is-error { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.form-status.is-ok { background: #ECFDF5; color: #065F46; border: 1px solid #A7F3D0; }
.form-done { display: flex; flex-direction: column; gap: 8px; padding: 28px; border-radius: 14px; background: #E6FAF6; color: #0B1F3A; font-size: 17px; outline: none; }
.form-done strong { font-family: Manrope, sans-serif; font-size: 22px; }
.field-error { border-color: #DC2626 !important; box-shadow: 0 0 0 3px rgba(220, 38, 38, .15) !important; }
.site-form { display: flex; flex-direction: column; gap: 18px; max-width: 680px; margin: 8px 0; padding: 32px; border: 1px solid #E2E8F0; border-radius: 18px; background: #ffffff; }
.site-form .field { display: flex; flex-direction: column; gap: 6px; font-size: 15px; font-weight: 600; color: #0B1F3A; }
.site-form input:not([type="checkbox"]):not([type="radio"]), .site-form select, .site-form textarea {
  font: inherit; font-weight: 400; font-size: 16px; border: 1px solid #CBD5E1; border-radius: 8px; padding: 0 12px; min-height: 48px; background: #ffffff; color: #0F172A; }
.site-form textarea { padding: 12px; min-height: 120px; }
.site-form input[type="file"] { padding: 10px 12px; }
.site-form fieldset { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.site-form legend { font-size: 15px; font-weight: 600; color: #0B1F3A; margin-bottom: 8px; width: 100%; }
.site-form .opt { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; font-weight: 400; }
.site-form .opt input { width: 18px; height: 18px; }
.btn-primary { height: 52px; border: 0; border-radius: 8px; background: #0B1F3A; color: #ffffff; font: inherit; font-weight: 600; font-size: 16px; cursor: pointer; padding: 0 28px; align-self: flex-start; }
.btn-primary:hover { background: #12294A; }
.btn-primary[disabled] { opacity: .6; cursor: wait; }
.form-note { margin: 0; font-size: 13px; color: #475569; }
.embed { position: relative; width: 100%; aspect-ratio: 16 / 9; }
.embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 14px; }
html[data-theme="dark"] .site-form { background: #132033; border-color: #22395E; }
html[data-theme="dark"] .site-form .field, html[data-theme="dark"] .site-form legend { color: #E6EDF7; }
html[data-theme="dark"] .form-done { background: #0E2C2A; color: #E6EDF7; }
html[data-theme="dark"] .form-note { color: #9FB0C8; }
html[data-theme="dark"] .btn-primary { background: #2DD4BF; color: #0B1F3A; }

/* ===== search ===== */
.search-page-form { display: flex; flex-direction: column; gap: 10px; max-width: 720px; }
.search-page-form input[type="search"] { flex: 1 1 320px; min-height: 52px; border: 1px solid #CBD5E1; border-radius: 8px; padding: 0 14px; font: inherit; font-size: 17px; }
.search-results { display: flex; flex-direction: column; gap: 4px; max-width: 820px; }
.search-hit { display: flex; flex-direction: column; gap: 4px; padding: 18px 0; border-top: 1px solid #E2E8F0; text-decoration: none; }
.search-hit strong { font-family: Manrope, sans-serif; font-size: 19px; color: #0B1F3A; }
.search-hit:hover strong { color: #0A6E63; }
.search-kind { font-size: 12px; font-weight: 700; letter-spacing: 1px; text-transform: uppercase; color: #0A6E63; }
.search-desc { font-size: 15px; line-height: 1.55; color: #475569; }
html[data-theme="dark"] .search-hit { border-color: #22395E; }
html[data-theme="dark"] .search-hit strong { color: #E6EDF7; }
html[data-theme="dark"] .search-desc { color: #9FB0C8; }
html[data-theme="dark"] .search-page-form input[type="search"] { background: #132033; color: #E6EDF7; border-color: #2B4268; }
