/* FundX Finance Ltd — fundxfinance.co.uk. Static, no third-party requests (CSP: style-src 'self', no inline styles). */
:root {
  --navy-950: #071120;
  --navy-900: #0b1a2e;
  --navy-800: #12263f;
  --navy-700: #1b3556;
  --ink: #0e1a2b;
  --ink-2: #3a4a63;
  --muted: #64748b;
  --line: #e2e7ef;
  --line-dark: rgba(255, 255, 255, .12);
  --paper: #ffffff;
  --wash: #f5f7fa;
  --accent: #1f5fae;
  --accent-600: #184e91;
  --accent-soft: #e8f0fb;
  --teal: #2bb3a3;
  --amber: #e0a43a;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --max: 1160px;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(14, 26, 43, .06), 0 8px 24px rgba(14, 26, 43, .06);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 16px/1.65 var(--sans); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); text-underline-offset: 3px; }
svg { display: block; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 28px; }
@media (max-width: 640px) { .wrap { padding: 0 16px; } }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 16px; background: var(--paper); padding: 8px 12px; z-index: 50; }

h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0; letter-spacing: -.005em; }
.eyebrow { display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--accent); margin: 0 0 18px; }
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; }

/* ── Header ─────────────────────────────────────────── */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(255, 255, 255, .94); backdrop-filter: saturate(160%) blur(10px); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none; }
.brand-mark { width: 36px; height: 36px; flex: none; }
.brand-name { display: block; font: 600 19px/1.1 var(--serif); }
.brand-sub { display: block; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; margin-top: 3px; }
.nav { display: flex; align-items: center; gap: 28px; font-size: 14.5px; }
.nav a { color: var(--ink-2); text-decoration: none; }
.nav a:hover { color: var(--accent); }
.nav .btn { padding: 9px 16px; font-size: 14px; }
.nav .btn-primary, .nav .btn-primary:hover { color: #fff; }
@media (max-width: 900px) { .nav a:not(.btn) { display: none; } }

/* ── Buttons ────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: 8px; font-weight: 600; font-size: 15px; text-decoration: none; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s; }
.btn-primary { background: var(--accent); color: #fff; }
.btn-primary:hover { background: var(--accent-600); }
.btn-light { background: #fff; color: var(--navy-900); }
.btn-light:hover { background: #e9eef6; }
.btn-outline-light { color: #fff; border-color: rgba(255, 255, 255, .35); }
.btn-outline-light:hover { border-color: #fff; }
.btn svg { width: 16px; height: 16px; }

/* ── Hero ───────────────────────────────────────────── */
.hero { position: relative; overflow: hidden; color: #dbe4f0; background: radial-gradient(1200px 600px at 85% -10%, #1d3c66 0%, transparent 60%), linear-gradient(180deg, var(--navy-900), var(--navy-950)); }
.hero::before { content: ""; position: absolute; inset: 0; background: url("/contours.svg") right -120px top -60px / 980px auto no-repeat; opacity: .5; pointer-events: none; }
.hero .wrap { position: relative; display: grid; grid-template-columns: 1.08fr .92fr; gap: 64px; align-items: center; padding-top: 96px; padding-bottom: 104px; }
@media (max-width: 980px) { .hero .wrap { grid-template-columns: 1fr; gap: 48px; padding-top: 64px; padding-bottom: 72px; } }
.hero .eyebrow { color: #8fb6e8; }
.hero h1 { color: #fff; font-size: clamp(34px, 4.6vw, 54px); margin-bottom: 22px; }
.hero h1 em { font-style: normal; color: #9cc3f2; }
.hero .lede { font-size: 18.5px; line-height: 1.65; color: #c3cfde; max-width: 56ch; margin: 0 0 34px; }
.hero .actions { display: flex; gap: 12px; flex-wrap: wrap; }
.hero .operator-note { margin: 36px 0 0; padding-top: 22px; border-top: 1px solid var(--line-dark); font-size: 13.5px; color: #93a3ba; max-width: 60ch; }

/* Illustrative output panel */
.panel { margin: 0; background: rgba(255, 255, 255, .97); color: var(--ink); border-radius: 14px; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .55), 0 0 0 1px rgba(255, 255, 255, .06); overflow: hidden; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--line); background: var(--wash); }
.panel-title { font: 600 15px/1.2 var(--sans); }
.panel-loc { font: 12px/1.4 var(--mono); color: var(--muted); margin-top: 3px; }
.tag { font-size: 11px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #8a5a00; background: #fdf3df; border: 1px solid #f3dfb4; padding: 3px 8px; border-radius: 999px; white-space: nowrap; }
.panel-body { padding: 18px 22px 8px; }
.panel h4 { margin: 0 0 12px; font: 600 12px/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.bars { display: grid; gap: 9px; margin-bottom: 20px; }
.bar { display: grid; grid-template-columns: 74px 1fr 52px; align-items: center; gap: 12px; font-size: 13px; }
.bar-label { color: var(--ink-2); }
.bar-track { display: block; height: 8px; background: #edf1f6; border-radius: 99px; overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, #5d9be0, var(--accent)); }
.w-0 { width: 2%; background: #c9d3e0; }
.w-20 { width: 20%; }
.w-40 { width: 40%; }
.w-85 { width: 85%; }
.bar-val { font: 600 13px/1 var(--mono); text-align: right; }
.metrics { display: grid; grid-template-columns: repeat(3, 1fr); border-top: 1px solid var(--line); }
.metric { padding: 14px 22px 16px; }
.metric + .metric { border-left: 1px solid var(--line); }
.metric-k { font-size: 11.5px; color: var(--muted); }
.metric-v { font: 600 18px/1.3 var(--serif); margin-top: 2px; }
.metric-v small { font: 500 11.5px var(--sans); color: var(--muted); }
.panel-foot { padding: 12px 22px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--muted); background: var(--wash); }
@media (max-width: 480px) { .metrics { grid-template-columns: 1fr; } .metric + .metric { border-left: 0; border-top: 1px solid var(--line); } .metric { padding: 12px 22px; } }

/* ── Source strip ───────────────────────────────────── */
.sources { border-bottom: 1px solid var(--line); background: var(--paper); }
.sources .wrap { display: flex; align-items: center; gap: 18px 40px; flex-wrap: wrap; padding-top: 26px; padding-bottom: 26px; }
.sources-label { font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.sources ul { display: flex; flex-wrap: wrap; gap: 10px 34px; list-style: none; margin: 0; padding: 0; }
.sources li { font: 600 15px/1.2 var(--serif); color: var(--ink-2); }
.sources li span { display: block; font: 400 11.5px/1.3 var(--sans); color: var(--muted); margin-top: 2px; }

/* ── Sections ───────────────────────────────────────── */
section { padding: 96px 0; }
@media (max-width: 640px) { section { padding: 64px 0; } }
.alt { background: var(--wash); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { display: grid; grid-template-columns: 1fr 1fr; gap: 24px 64px; align-items: end; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 3.4vw, 40px); }
.section-head p { margin: 0; color: var(--ink-2); font-size: 17px; }
@media (max-width: 860px) { .section-head { grid-template-columns: 1fr; } }

.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.card { position: relative; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.card h3 { font-size: 21px; margin: 16px 0 10px; }
.card p { margin: 0; color: var(--ink-2); font-size: 15px; }
.card .meta { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 12.5px; color: var(--muted); }
.icon { width: 44px; height: 44px; border-radius: 10px; background: var(--accent-soft); color: var(--accent); display: grid; place-items: center; }
.icon svg { width: 22px; height: 22px; }

.note { display: flex; gap: 16px; margin-top: 32px; padding: 20px 24px; background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--amber); border-radius: 0 var(--radius) var(--radius) 0; font-size: 15px; color: var(--ink-2); }
.note strong { color: var(--ink); }

/* Who */
.segment { display: grid; grid-template-columns: 52px 1fr; gap: 18px; padding: 30px 0; border-top: 1px solid var(--line); }
.segment-n { font: 600 15px/1 var(--mono); color: var(--accent); padding-top: 6px; }
.segment h3 { font-size: 22px; margin-bottom: 8px; }
.segment p { margin: 0; color: var(--ink-2); }
.segments { display: grid; grid-template-columns: 1fr 1fr; column-gap: 64px; }
@media (max-width: 860px) { .segments { grid-template-columns: 1fr; } }

/* How */
.how { display: grid; grid-template-columns: 1.5fr 1fr; gap: 56px; align-items: start; }
@media (max-width: 900px) { .how { grid-template-columns: 1fr; } }
.steps { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.steps li { counter-increment: step; position: relative; padding: 0 0 34px 64px; }
.steps li:last-child { padding-bottom: 0; }
.steps li::before { content: counter(step, decimal-leading-zero); position: absolute; left: 0; top: 0; width: 42px; height: 42px; border-radius: 50%; background: var(--navy-900); color: #fff; font: 600 13px/42px var(--mono); text-align: center; }
.steps li:not(:last-child)::after { content: ""; position: absolute; left: 20px; top: 46px; bottom: 6px; width: 2px; background: var(--line); }
.steps h3 { font-size: 20px; margin: 8px 0 6px; }
.steps p { margin: 0; color: var(--ink-2); }
.callout { background: var(--navy-900); color: #c3cfde; border-radius: 14px; padding: 32px; }
.callout .icon { background: rgba(255, 255, 255, .08); color: #9cc3f2; }
.callout h3 { color: #fff; font-size: 23px; margin: 18px 0 10px; }
.callout p { margin: 0 0 14px; font-size: 15px; }
.callout ul { margin: 0; padding: 0; list-style: none; font-size: 14.5px; }
.callout li { padding: 9px 0 9px 26px; border-top: 1px solid var(--line-dark); position: relative; }
.callout li::before { content: ""; position: absolute; left: 2px; top: 16px; width: 10px; height: 6px; border-left: 2px solid var(--teal); border-bottom: 2px solid var(--teal); transform: rotate(-45deg); }

/* Governance */
.link-card { display: block; text-decoration: none; color: inherit; transition: border-color .15s, transform .15s; }
.link-card:hover { border-color: #b9cbe4; transform: translateY(-2px); }
.link-card .go { display: inline-flex; align-items: center; gap: 6px; margin-top: 18px; font-size: 14px; font-weight: 600; color: var(--accent); }
.link-card .go svg { width: 14px; height: 14px; }

/* Company */
.company { display: grid; grid-template-columns: .9fr 1.1fr; gap: 64px; align-items: start; }
@media (max-width: 900px) { .company { grid-template-columns: 1fr; gap: 32px; } }
.company h2 { font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 18px; }
.company p { color: var(--ink-2); font-size: 16.5px; }
.facts { width: 100%; border-collapse: collapse; font-size: 15px; }
.facts th, .facts td { text-align: left; padding: 15px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.facts tr:last-child th, .facts tr:last-child td { border-bottom: 0; }
.facts th { width: 40%; font-weight: 500; color: var(--muted); padding-right: 16px; }
.facts td { color: var(--ink); font-weight: 500; }
.facts-card { padding: 8px 28px; }
.prod { display: inline-flex; align-items: center; gap: 10px; }
.prod-icon { width: 28px; height: 28px; border-radius: 7px; flex: none; }
.foot-prod { display: inline-flex; align-items: center; gap: 8px; }
.foot-prod img { width: 16px; height: 16px; border-radius: 4px; flex: none; }
@media (max-width: 640px) { .facts th, .facts td { display: block; width: 100%; padding: 2px 0; border: 0; } .facts th { padding-top: 14px; } .facts tr { display: block; border-bottom: 1px solid var(--line); padding-bottom: 12px; } }

/* Contact band */
.contact { background: linear-gradient(135deg, var(--navy-800), var(--navy-950)); color: #c3cfde; }
.contact .wrap { display: flex; justify-content: space-between; align-items: center; gap: 32px; flex-wrap: wrap; }
.contact h2 { color: #fff; font-size: clamp(28px, 3.4vw, 40px); margin-bottom: 12px; }
.contact p { margin: 0; max-width: 58ch; font-size: 17px; }
.contact .actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* Prose pages */
.prose { max-width: 74ch; padding: 64px 0 88px; }
.prose h1 { font-size: clamp(32px, 4vw, 44px); margin-bottom: 10px; }
.prose h2 { font-size: 23px; margin: 40px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose .updated { color: var(--muted); font-size: 14px; margin-bottom: 28px; }

/* ── Footer ─────────────────────────────────────────── */
.site-footer { background: var(--navy-950); color: #93a3ba; font-size: 14px; padding: 56px 0 36px; }
.site-footer a { color: #dbe4f0; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 36px; border-bottom: 1px solid var(--line-dark); }
@media (max-width: 760px) { .footer-top { grid-template-columns: 1fr; } }
.site-footer .brand { color: #fff; }
.site-footer .brand-sub { color: #93a3ba; }
.site-footer p { margin: 16px 0 0; max-width: 42ch; }
.footer-h { color: #fff; font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; margin-bottom: 14px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; }
.site-footer address { font-style: normal; line-height: 1.75; }
.footer-legal { padding-top: 26px; font-size: 12.5px; line-height: 1.7; color: #7d8ca3; }
.footer-legal strong { color: #c3cfde; font-weight: 600; }

/* ── UK flood outlook (filled by outlook.js) ────────── */
.outlook { background: var(--wash); border-bottom: 1px solid var(--line); }
.outlook-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; }
@media (max-width: 900px) { .outlook-grid { grid-template-columns: 1fr; } }
.outlook-card { background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; box-shadow: var(--shadow); }
.outlook-loading { color: var(--muted); min-height: 160px; }
.outlook-headline { margin: 0 0 18px; font: 600 20px/1.35 var(--serif); color: var(--ink); }
.outlook-sources { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
@media (max-width: 640px) { .outlook-sources { grid-template-columns: 1fr 1fr; } }
.lvl { border-radius: 8px; padding: 10px 12px; border: 1px solid; }
.lvl-k { display: block; font-size: 12px; opacity: .85; }
.lvl-v { display: block; font-weight: 700; font-size: 15px; margin-top: 2px; }
.lvl-very-low { background: #ecfdf3; color: #065f46; border-color: #b7ebcf; }
.lvl-low { background: #fefce8; color: #854d0e; border-color: #fde68a; }
.lvl-medium { background: #fff1db; color: #92400e; border-color: #f8c97a; }
.lvl-high { background: #ffe4e6; color: #9f1239; border-color: #fda4af; }
.lvl-none { background: var(--wash); color: var(--ink-2); border-color: var(--line); }
.outlook-sub { margin: 0 0 14px; font-weight: 600; color: var(--ink); }
.outlook-counts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.count { background: var(--wash); border-radius: 8px; padding: 10px 6px; }
.count-n { display: block; font: 700 26px/1.1 var(--sans); font-variant-numeric: tabular-nums; }
.count-k { display: block; font-size: 11.5px; color: var(--muted); line-height: 1.3; margin-top: 4px; }
.count-sev .count-n { color: #be123c; }
.count-warn .count-n { color: #c2410c; }
.count-alert .count-n { color: #b45309; }
.outlook-list { list-style: none; margin: 14px 0 0; padding: 0; font-size: 14px; }
.outlook-list li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); color: var(--ink-2); }
.outlook-sev { flex: none; font-size: 12px; color: var(--muted); }
.outlook-note { margin: 14px 0 0; color: var(--ink-2); font-size: 15px; }
.outlook-meta { margin: 18px 0 0; font-size: 13px; color: var(--muted); }
.outlook-src { margin: 4px 0 0; font-size: 12px; color: var(--muted); }
.outlook-cta { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-top: 28px; padding: 22px 26px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
.outlook-cta p { margin: 0; color: var(--ink-2); max-width: 62ch; }
.outlook-attr { margin: 14px 0 0; font-size: 12px; color: var(--muted); }

/* 404 page */
.nf .wrap { grid-template-columns: 1.3fr .7fr; padding-top: 88px; padding-bottom: 96px; }
.nf-code { font-family: var(--serif); font-weight: 600; font-size: clamp(96px, 16vw, 200px); line-height: 1; color: transparent; -webkit-text-stroke: 1.5px rgba(156, 195, 242, .55); text-align: right; letter-spacing: -.02em; user-select: none; }
@media (max-width: 980px) { .nf .wrap { grid-template-columns: 1fr; } .nf-code { display: none; } }
.nf-brands { padding: 56px 0 72px; background: var(--wash); }
.nf-brands-h { margin: 0 0 18px; font-size: 12.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.nf-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 900px) { .nf-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .nf-grid { grid-template-columns: 1fr; } }
.nf-card { display: grid; gap: 6px; padding: 20px 22px; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); text-decoration: none; color: var(--ink); transition: border-color .15s, transform .15s; }
.nf-card:hover { border-color: var(--accent); transform: translateY(-2px); }
.nf-card b { font-family: var(--serif); font-size: 19px; font-weight: 600; color: var(--navy-900); }
.nf-card span { font-size: 14px; line-height: 1.5; color: var(--ink-2); }
