/* FinTrace shared components. Loaded in the frontend and the Gutenberg canvas. */
:root {
  --fti-bg: var(--wp--preset--color--background, #f7f9fc); --fti-surface: var(--wp--preset--color--surface, #fff); --fti-text: var(--wp--preset--color--text, #142536); --fti-muted: var(--wp--preset--color--muted, #536579); --fti-accent: var(--wp--preset--color--accent, #006b5e); --fti-line: #d5dfe6;
  --fti-space-1: .25rem; --fti-space-2: .5rem; --fti-space-3: .75rem; --fti-space-4: 1rem;
  --fti-space-6: 1.5rem; --fti-space-8: 2rem; --fti-space-12: 3rem; --fti-space-16: 4rem; --fti-space-24: 6rem;
  --fti-radius-sm: 6px; --fti-radius-md: 14px; --fti-radius-lg: 24px;
  --fti-shadow: 0 18px 60px #14253612; --fti-accent-soft: #e9f4ef;
  --fti-danger: #9a2838; --fti-notice: #77560e;
}
h1, h2, h3, h4 { text-wrap: balance; }
h2 { font-size: clamp(1.8rem, 3.3vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p { line-height: 1.7; }
.button, .wp-block-button__link { transition: background-color .16s ease, border-color .16s ease; }
.button:hover, .wp-block-button__link:hover { background: #005347; color: #fff; border-color: #005347; }
.button:active { background: #003f37; }
.button-outline:hover, .is-style-outline .wp-block-button__link:hover { background: var(--fti-accent-soft); color: var(--fti-accent); }
.button:disabled, fieldset:disabled .button, .wp-block-button__link[aria-disabled="true"] { background: #e5ebef; color: #536579; border-color: #c8d3dd; cursor: not-allowed; }
.button-small { min-height: 42px; padding: 10px 16px; font-size: .8125rem; white-space: nowrap; }
.button-row, .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.text-button, .is-style-fti-quiet .wp-block-button__link { color: var(--fti-accent); background: transparent; border: 0; padding: 10px 0; min-height: 44px; text-decoration: underline; text-underline-offset: .25em; font: inherit; font-size: .875rem; cursor: pointer; }
.text-button:hover { color: #003f37; }
.announcement { background: var(--fti-accent-soft); border-bottom: 1px solid #d6e8df; font-size: .75rem; }
.announcement-inner { display: flex; align-items: center; justify-content: center; min-height: 40px; position: relative; padding-inline: 38px; }
.announcement p { margin: 8px 0; }
.announcement a { margin-left: 16px; font-weight: 600; text-decoration: none; }
.announcement-dismiss { position: absolute; right: 0; min-width: 40px; min-height: 40px; border: 0; background: transparent; color: var(--fti-accent); cursor: pointer; font-size: 1.25rem; }
.site-header { position: relative; background: #fff; z-index: 30; }
.header-inner { min-height: 92px; gap: 24px; }
.brand-name { display: inline-flex; align-items: center; gap: 12px; font-size: 1rem; line-height: 1.25; }
.site-brand { flex-shrink: 0; }
.site-brand .brand-name > span:last-child { max-width: 120px; }
.brand-mark { width: 32px; height: 32px; display: inline-grid; grid-template-columns: repeat(3, 5px); align-items: end; justify-content: center; gap: 3px; transform: skewY(-15deg); }
.brand-mark i { background: var(--fti-accent); height: 27px; }
.brand-mark i:nth-child(2) { height: 21px; }
.brand-mark i:nth-child(3) { height: 14px; }
.primary-navigation { flex: 1; justify-content: space-between; gap: 24px; }
.primary-navigation a.button { color: #fff; }
.primary-navigation a.button:hover { color: #fff; }
.utility-links { gap: 20px; white-space: nowrap; }
.sign-in { font-size: .8125rem; padding-block: 14px; }
.mega-menu, .mega-links, .mega-sub-links { list-style: none; padding: 0; margin: 0; }
.mega-menu { display: flex; align-items: center; gap: 4px; }
.mega-menu > li > .top-link, .mega-menu summary { min-height: 44px; display: flex; align-items: center; gap: 9px; padding: 12px 10px; font-weight: 550; cursor: pointer; font-size: .8125rem; list-style: none; border-radius: 6px; }
.mega-menu summary::-webkit-details-marker { display: none; }
.mega-menu summary:hover, .mega-menu details[open] > summary { background: #eff6f3; color: var(--fti-accent); }
.chevron { width: 6px; height: 6px; border-right: 1.5px solid; border-bottom: 1.5px solid; transform: rotate(45deg) translateY(-2px); }
details[open] > summary .chevron { transform: rotate(225deg) translate(-2px, -1px); }
.mega-panel { position: absolute; top: calc(100% - 1px); left: max(24px, calc((100% - 1200px) / 2)); right: max(24px, calc((100% - 1200px) / 2)); display: grid; grid-template-columns: 1fr 2fr; gap: 36px; padding: 32px; background: #fff; border: 1px solid var(--fti-line); border-radius: 0 0 18px 18px; box-shadow: var(--fti-shadow); }
.mega-intro { padding: 8px 32px 8px 8px; border-right: 1px solid var(--fti-line); }
.mega-intro .mega-title { font-size: 1.75rem; color: var(--fti-text); margin: 12px 0; line-height: 1.2; }
.mega-intro p { font-size: .875rem; color: var(--fti-muted); }
.mega-overview { display: inline-flex; min-height: 44px; align-items: center; font-weight: 650; color: var(--fti-accent) !important; }
.mega-overview::after { content: ' ↗'; margin-left: 14px; }
.mega-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-content: start; gap: 8px; }
.primary-navigation .mega-link { display: flex; flex-direction: column; gap: 5px; padding: 18px !important; border-radius: 10px; }
.mega-link:hover { background: var(--fti-bg); }
.mega-link > span:first-child { font-size: .9375rem; font-weight: 650; }
.menu-description { font-size: .8125rem; color: var(--fti-muted); font-weight: 400; line-height: 1.5; white-space: normal; }
.mega-sub-links { padding: 0 18px 14px; }
.mega-sub-links a { display: block; padding: 8px 0; }
.mega-menu [aria-current="page"] { color: var(--fti-accent); }
.badge { display: inline-flex; align-items: center; border-radius: 100px; padding: 5px 12px; font-size: .6875rem; font-weight: 650; letter-spacing: .02em; line-height: 1.6; width: fit-content; }
.badge-neutral { background: #eaf0f5; color: #42586c; }
.badge-accent { background: #e3f2e9; color: #006150; }
.badge-notice { background: #fff1d2; color: #77560e; }
.is-style-fti-card, .fti-card { padding: clamp(24px, 3vw, 36px); background: var(--fti-surface); border: 1px solid var(--fti-line); border-radius: var(--fti-radius-md); height: 100%; }
.is-style-fti-card h3, .fti-card h3 { margin-top: 20px; }
.is-style-fti-card p, .fti-card p { color: var(--fti-muted); }
.is-style-fti-spotlight { padding: clamp(28px, 5vw, 64px); background: var(--fti-accent-soft); border-radius: var(--fti-radius-lg); }
.is-style-fti-section, .fti-section { padding-block: clamp(24px, 4vw, 48px); }
.is-style-fti-eyebrow { color: var(--fti-accent); font-size: .75rem; text-transform: uppercase; letter-spacing: .12em; }
.fti-cta { display: flex; align-items: center; justify-content: space-between; gap: 36px; padding: clamp(28px, 5vw, 56px); background: var(--fti-accent-soft); border: 1px solid #d2e7dc; border-radius: var(--fti-radius-lg); }
.fti-cta h2 { margin: 0 0 12px; font-size: clamp(1.65rem, 3vw, 2.5rem); }
.fti-cta p { color: var(--fti-muted); max-width: 620px; margin: 0; }
.fti-cta .button { flex-shrink: 0; }
.fti-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.entry-content > .wp-block-fintrace-cta, .entry-content > .fti-feature-grid, .entry-content > .is-style-fti-section, .entry-content > .wp-block-columns { max-width: 100%; }
.wp-block-details { padding: 22px 0; border-bottom: 1px solid var(--fti-line); }
.wp-block-details summary { cursor: pointer; font-weight: 600; min-height: 30px; }
.wp-block-details p { color: var(--fti-muted); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-size: 1.25rem; font-weight: 600; margin-bottom: 8px; }
.field-hint { font-size: .8125rem; color: var(--fti-muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 22px; margin-block: 26px; }
.field-wide { grid-column: 1 / -1; }
.field label { display: block; font-size: .8125rem; font-weight: 600; margin-bottom: 8px; }
input:not([type="checkbox"]):not([type="hidden"]), select, textarea { width: 100%; min-height: 48px; padding: 12px 14px; border: 1px solid #98aab9; border-radius: 7px; background: #fff; color: var(--fti-text); font-size: .9375rem; }
input::placeholder, textarea::placeholder { color: #667b8d; }
input:disabled, textarea:disabled, select:disabled { background: #eff3f6; color: var(--fti-muted); cursor: not-allowed; }
textarea { resize: vertical; }
input[type="checkbox"] { accent-color: var(--fti-accent); width: 18px; height: 18px; flex-shrink: 0; }
.consent-field { display: flex; align-items: start; gap: 12px; font-size: .8125rem; margin-bottom: 26px; }
.form-notice { padding: 16px 20px; background: #eef3f8; border-left: 3px solid #637c94; border-radius: 6px; font-size: .875rem; }
.form-notice.is-error { background: #fff1f3; border-color: var(--fti-danger); color: var(--fti-danger); }
.form-notice.is-success { background: #e9f4ef; border-color: var(--fti-accent); color: var(--fti-accent); }
.form-honeypot { position: absolute; left: -10000px; width: 1px; overflow: hidden; }
.demo-form-wrap { background: #fff; border: 1px solid var(--fti-line); padding: clamp(24px, 4vw, 42px); border-radius: 18px; }
.search-form { display: flex; gap: 12px; max-width: 700px; margin-block: 24px; }
.search-form input { min-width: 0; }
.empty-state { padding: 40px; border: 1px solid var(--fti-line); border-radius: 16px; background: #fff; }
.site-footer { background: #eef3f5; padding: 0; }
.footer-cta { display: flex; align-items: center; justify-content: space-between; gap: 28px; padding-block: 56px; border-bottom: 1px solid #cbd7df; }
.footer-cta h2 { margin: 12px 0 0; max-width: 660px; font-size: clamp(1.8rem, 3.4vw, 2.75rem); }
.footer-grid { display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 48px; padding-block: 56px; }
.footer-brand { max-width: 290px; }
.footer-note { color: var(--fti-muted); font-size: .8125rem; }
.footer-address { font-style: normal; color: var(--fti-muted); font-size: .8125rem; line-height: 1.6; margin-top: 14px; }
.footer-column h3 { font-size: .8125rem; margin: 0 0 20px; }
.footer-column { min-width: 0; overflow-wrap: anywhere; }
.footer-column .menu { display: block; }
.footer-column a { color: var(--fti-muted); font-size: .8125rem; text-decoration: none; display: inline-block; padding: 4px 0; }
.footer-column a:hover { color: var(--fti-accent); text-decoration: underline; }
.footer-bottom { display: flex; align-items: center; flex-wrap: wrap; justify-content: space-between; gap: 20px; padding-block: 20px; border-top: 1px solid #cbd7df; font-size: .75rem; color: var(--fti-muted); }
.footer-bottom p { margin: 0; }
.footer-bottom ul { display: flex; flex-wrap: wrap; gap: 20px; }
.footer-bottom li { margin: 0; }
.cookie-banner { position: fixed; z-index: 100; right: 24px; bottom: 24px; width: min(600px, calc(100% - 48px)); max-height: calc(100dvh - 48px); overflow-y: auto; padding: 28px; background: #fff; border: 1px solid var(--fti-line); border-radius: 18px; box-shadow: 0 12px 60px #14253630; }
.cookie-banner h2 { font-size: 1.5rem; margin: 14px 0 10px; }
.cookie-banner p { font-size: .8125rem; color: var(--fti-muted); }
.cookie-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 20px; }
.cookie-actions .button { font-size: .75rem; padding: 10px 14px; }
.cookie-options { padding-top: 14px; border-top: 1px solid var(--fti-line); margin-top: 18px; }
.cookie-options label { display: flex; align-items: center; gap: 10px; font-size: .875rem; padding: 7px 0; }
.cookie-storage-status:empty { display: none; }
@media (max-width: 1180px) {
  .header-inner { flex-wrap: wrap; padding-block: 18px; min-height: 80px; justify-content: space-between; }
  .primary-navigation { flex-basis: 100%; flex-direction: column; align-items: stretch; padding-bottom: 10px; }
  .menu-toggle:not([hidden]) { display: inline-flex; }
  .primary-navigation.is-enhanced:not(.is-open) { display: none; }
  .mega-menu { display: block; }
  .mega-menu summary, .mega-menu > li > .top-link { justify-content: space-between; padding: 16px 8px; font-size: 1rem; border-bottom: 1px solid var(--fti-line); }
  .mega-panel { position: static; display: block; padding: 18px; box-shadow: none; border-radius: 12px; margin-top: 10px; }
  .mega-intro { border-right: 0; border-bottom: 1px solid var(--fti-line); padding: 0 0 14px; margin-bottom: 14px; }
  .mega-intro .mega-title { display: none; }
  .mega-intro .eyebrow { display: none; }
  .mega-links { gap: 4px; }
  .utility-links { display: flex; flex-direction: row; justify-content: space-between; border-top: 1px solid var(--fti-line); padding-top: 20px; margin-top: 12px; }
}
@media (max-width: 780px) {
  .fti-feature-grid { grid-template-columns: 1fr; }
  .fti-cta, .footer-cta { flex-direction: column; align-items: start; }
  .footer-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
  .footer-brand { grid-column: 1 / -1; margin-bottom: 20px; }
}
@media (max-width: 600px) {
  .mega-links, .form-grid { grid-template-columns: 1fr; }
  .announcement-inner { justify-content: start; padding-left: 0; }
  .announcement a { display: inline-block; margin-left: 0; margin-right: 8px; }
  .brand-mark { width: 26px; }
  .footer-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-column:last-child { grid-column: 1 / -1; }
  .footer-bottom { align-items: start; flex-direction: column; gap: 12px; }
  .search-form { flex-direction: column; }
  .cookie-banner { padding: 22px; right: 12px; bottom: 12px; width: calc(100% - 24px); }
  .cookie-actions { gap: 8px; }
  .cookie-actions .button { flex: 1; }
}
@media (prefers-reduced-motion: reduce) { .button, .wp-block-button__link { transition: none; } }

/* Premium dark footer (site-wide) */
.site-footer { background:#07161f; color:#b7cccd; border-top:1px solid #16394a; position:relative; }
.site-footer::before { content:''; position:absolute; inset:0; background-image:linear-gradient(rgba(255,255,255,.03) 1px,transparent 1px),linear-gradient(90deg,rgba(255,255,255,.03) 1px,transparent 1px); background-size:56px 56px; mask-image:linear-gradient(180deg,#000,transparent 70%); -webkit-mask-image:linear-gradient(180deg,#000,transparent 70%); pointer-events:none; }
.site-footer .shell { position:relative; }
.site-footer .footer-cta { border-bottom-color:#1c3f50; }
.site-footer .footer-cta h2, .site-footer h3, .site-footer .brand-name { color:#fff; }
.site-footer .eyebrow { color:#6fd6b4; }
.site-footer .footer-note, .site-footer .footer-address { color:#a9bfc2; font-size:.9375rem; }
.site-footer .footer-column h3 { font-size:.8125rem; letter-spacing:.14em; text-transform:uppercase; color:#8fb0b5; }
.site-footer .footer-column a { color:#d3e2e2; font-size:.9375rem; }
.site-footer .footer-column a:hover { color:#6fd6b4; }
.site-footer .footer-trust { list-style:none; display:flex; flex-wrap:wrap; gap:14px 36px; margin:0; padding:26px 0; border-top:1px solid #1c3f50; }
.site-footer .footer-trust li { display:flex; align-items:center; gap:10px; font-size:.9375rem; color:#c9dada; }
.site-footer .footer-trust svg { width:20px; height:20px; flex:none; fill:none; stroke:#6fd6b4; stroke-width:1.7; stroke-linecap:round; stroke-linejoin:round; }
.site-footer .footer-bottom { border-top-color:#1c3f50; color:#9db5b8; font-size:.875rem; }
.site-footer .footer-bottom a, .site-footer .text-button { color:#c9dada; }
.site-footer .footer-bottom a:hover, .site-footer .text-button:hover { color:#6fd6b4; }
