:root {
  --navy: #0b1736;
  --navy-2: #12255c;
  --ink: #14244d;
  --muted: #4a5a82;
  --blue: #1d4fa8;
  --line: #e1e9f7;
  --page: #f1f5fd;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--page) url("../images/page_bg.png") center / cover no-repeat fixed;
  line-height: 1.5;
}
.container { width: 100%; max-width: 940px; margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
[hidden] { display: none !important; }

/* top bar */
.topbar { background: var(--navy); border-bottom: 1px solid rgba(255, 255, 255, .12); }
.bar { display: flex; align-items: center; justify-content: flex-start; gap: 16px; padding-top: 12px; padding-bottom: 12px; }
.brand { display: block; background: #fff; border-radius: 10px; padding: 6px 12px; line-height: 0; }
.brand img { height: 64px; width: auto; max-width: 100%; display: block; }

/* hero */
.hero, .legal-hero {
  color: #fff;
  background:
    radial-gradient(60% 120% at 80% 0%, rgba(20, 130, 170, .55), transparent 60%),
    radial-gradient(60% 100% at 100% 100%, rgba(60, 80, 220, .7), transparent 60%),
    linear-gradient(135deg, #0b1736 0%, #0f2152 55%, #1b3a9a 100%);
}
.hero { padding: 54px 0 84px; }
.hero h1 { margin: 0 0 14px; font-size: clamp(32px, 7vw, 54px); line-height: 1.08; font-weight: 800; letter-spacing: -.01em; }
.hero p { margin: 0; font-size: clamp(15px, 2.4vw, 18px); opacity: .92; max-width: 640px; }

.main { padding-bottom: 36px; }
.card { background: #fff; border-radius: 16px; box-shadow: 0 10px 30px rgba(16, 34, 74, .1); }

/* search */
.search { margin-top: -38px; padding: 14px 20px; position: relative; }
.search input {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: var(--page); border: 1px solid transparent; border-radius: 10px; padding: 14px 16px;
}
.search input::placeholder { color: #7a89ad; }
.search input:focus { outline: 2px solid var(--blue); background: #fff; }

/* sections + questions */
.faq-section { margin-top: 30px; }
.faq-section h2 { margin: 0 0 12px; font-size: 22px; font-weight: 800; letter-spacing: -.005em; }
.faq-group { display: grid; gap: 10px; }
.faq {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 2px 8px rgba(16, 34, 74, .05); overflow: hidden;
  transition: border-color .2s, box-shadow .2s;
}
.faq.open { border-color: #9db8ea; box-shadow: 0 6px 18px rgba(29, 79, 168, .12); }
.faq h3 { margin: 0; font-size: inherit; }
.faq-q {
  all: unset; box-sizing: border-box; width: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 14px;
  padding: 18px 22px; font-size: 15.5px; font-weight: 700; line-height: 1.35; cursor: pointer;
}
.faq-q:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; border-radius: 14px; }
.icon {
  flex: none; position: relative; width: 32px; height: 32px; border-radius: 50%;
  background: #e4ecfb; transition: background .2s;
}
.icon::before, .icon::after {
  content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 2px;
  background: var(--blue); border-radius: 2px; transform: translate(-50%, -50%);
  transition: transform .25s, background .2s;
}
.icon::after { transform: translate(-50%, -50%) rotate(90deg); }
.faq.open .icon { background: var(--blue); }
.faq.open .icon::before, .faq.open .icon::after { background: #fff; }
.faq.open .icon::after { transform: translate(-50%, -50%) rotate(0deg); }

.faq-a { display: grid; grid-template-rows: 0fr; transition: grid-template-rows .3s ease; }
.faq.open .faq-a { grid-template-rows: 1fr; }
.faq-a-inner { overflow: hidden; padding: 0 22px; }
.faq.open .faq-a-inner { padding-bottom: 20px; }
.faq-a-inner::before { content: ""; display: block; height: 1px; background: var(--line); margin-bottom: 14px; }
.faq-a p { margin: 0; font-size: 15px; line-height: 1.65; color: var(--muted); }
.creds { margin-top: 12px !important; display: flex; flex-wrap: wrap; gap: 6px; }
.chip { font-size: 12px; font-weight: 600; color: var(--blue); background: #e6eefb; border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; }
.empty { text-align: center; color: var(--muted); margin: 30px 0; }

/* ask form */
.ask { position: relative; width: 100%; max-width: 640px; max-height: calc(100vh - 32px); overflow-y: auto; padding: 30px 32px 34px; }

/* floating "Ask a question" button + popup */
.ask-fab {
  position: fixed; right: 20px; bottom: 70px; z-index: 40;
  display: inline-flex; align-items: center; gap: 8px; cursor: pointer;
  font: inherit; font-weight: 700; font-size: 14.5px; color: #fff;
  background: var(--blue); border: 0; border-radius: 999px; padding: 12px 18px;
  box-shadow: 0 8px 24px rgba(16, 34, 74, .35);
}
.ask-fab:hover { background: #163f88; }
.ask-fab:focus-visible { outline: 3px solid #fff; outline-offset: 2px; box-shadow: 0 0 0 5px var(--blue); }
.modal { position: fixed; inset: 0; z-index: 50; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal[hidden] { display: none; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(11, 23, 54, .55); }
.modal .ask { position: relative; }
.modal-close {
  position: absolute; top: 12px; right: 14px; width: 36px; height: 36px; border: 0; border-radius: 50%;
  background: #e4ecfb; color: var(--ink); font-size: 24px; line-height: 1; cursor: pointer;
}
.modal-close:hover { background: #d3e0f8; }
body.modal-open { overflow: hidden; }
.ask h2 { margin: 0 0 8px; font-size: 26px; font-weight: 800; }
.ask .lead { margin: 0 0 20px; color: var(--muted); font-size: 16px; }
.ask label { display: block; margin: 18px 0 8px; font-weight: 700; font-size: 15px; }
.ask textarea, .ask input[type=email], .ask input[type=text] {
  width: 100%; font: inherit; font-size: 15px; color: var(--ink);
  background: #f8faff; border: 1px solid #cfdcf3; border-radius: 12px; padding: 13px 16px;
}
.ask textarea { resize: vertical; min-height: 120px; }
.ask textarea:focus, .ask input:focus { outline: 2px solid var(--blue); background: #fff; border-color: var(--blue); }
.hint { margin: 8px 0 0; font-size: 13.5px; color: var(--muted); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.btn {
  margin-top: 22px; font: inherit; font-size: 15px; font-weight: 700; color: #fff;
  background: var(--blue); border: 0; border-radius: 12px; padding: 13px 28px; cursor: pointer;
}
.btn:hover { background: #163f88; }
.notice { margin: 0 0 16px; padding: 12px 16px; border-radius: 12px; font-size: 14.5px; }
.notice.success { background: #e6f5ec; color: #14532d; border: 1px solid #b7e1c4; }
.notice.error { background: #fdecea; color: #8a1c14; border: 1px solid #f0c4c0; }

/* footer */
.footer { padding: 26px 0 40px; text-align: center; font-size: 12.5px; color: var(--ink); border-top: 1px solid var(--line); background: #eaf0fb; }
.footer p { margin: 3px 0; }
.footer a { color: var(--ink); font-weight: 600; text-decoration: none; }
.footer a:hover { text-decoration: underline; }
.footer .cin { color: var(--muted); font-size: 12px; }

/* legal pages */
.legal-hero { padding: 40px 0 70px; }
.legal-hero .eyebrow { margin: 0 0 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; font-weight: 600; }
.legal-hero h1 { margin: 0; font-size: clamp(28px, 6vw, 42px); font-weight: 800; }
.legal-card { margin: -36px 0 40px; padding: 28px 32px 32px; position: relative; }
.legal-card h2 { margin: 28px 0 8px; font-size: 19px; font-weight: 800; }
.legal-card p { margin: 0 0 12px; color: var(--muted); font-size: 15px; line-height: 1.7; }
.legal-card a { color: var(--blue); }
.kv { margin: 0; display: grid; gap: 6px; }
.kv > div { display: grid; grid-template-columns: 150px 1fr; gap: 12px; font-size: 14.5px; }
.kv dt { font-weight: 700; color: var(--ink); }
.kv dd { margin: 0; color: var(--muted); overflow-wrap: anywhere; }
.contact { margin-top: 30px; padding: 18px 20px; background: var(--page); border: 1px solid var(--line); border-radius: 12px; }
.contact h2 { margin-top: 0; }
.table-wrap { overflow-x: auto; margin: 6px 0 14px; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { width: 100%; border-collapse: collapse; font-size: 14.5px; min-width: 520px; }
.table-wrap th, .table-wrap td { text-align: left; padding: 11px 14px; vertical-align: top; border-bottom: 1px solid var(--line); }
.table-wrap th { background: var(--page); font-weight: 700; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap td { color: var(--muted); }
.table-wrap td:first-child { color: var(--ink); font-weight: 600; width: 32%; }
.back { margin-top: 26px !important; }
.back a { font-weight: 700; text-decoration: none; }

@media (max-width: 600px) {
  .hero { padding: 36px 0 70px; }
  .brand img { height: 44px; }
  .faq-q { padding: 15px 16px; font-size: 14.5px; }
  .faq-a-inner { padding-left: 16px; padding-right: 16px; }
  .faq-a p { font-size: 14px; }
  .ask { padding: 22px 18px 26px; }
  .ask-fab { right: 14px; bottom: 64px; padding: 11px 15px; }
  .legal-card { padding: 22px 18px 26px; }
  .kv > div { grid-template-columns: 1fr; gap: 0; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .faq-a, .icon::before, .icon::after { transition: none; }
}

/* smooth page + popup transitions */
@keyframes pageFade { from { opacity: 0; } to { opacity: 1; } }
@keyframes riseIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes popIn { from { opacity: 0; transform: translateY(18px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes fadeOnly { from { opacity: 0; } to { opacity: 1; } }
body { animation: pageFade .45s ease both; }
.hero, .legal-hero, .main { animation: riseIn .55s cubic-bezier(.2, .7, .2, 1) both; }
.main { animation-delay: .08s; }
.ask-fab { animation: riseIn .5s .3s cubic-bezier(.2, .7, .2, 1) both; transition: background .2s, transform .2s; }
.ask-fab:hover { transform: translateY(-2px); }
.modal:not([hidden]) .modal-backdrop { animation: fadeOnly .25s ease both; }
.modal:not([hidden]) .ask { animation: popIn .3s cubic-bezier(.2, .7, .2, 1) both; }
.modal.closing .modal-backdrop { animation: fadeOnly .2s ease reverse both; }
.modal.closing .ask { animation: popIn .2s ease reverse both; }
@media (prefers-reduced-motion: reduce) {
  body, .hero, .legal-hero, .main, .ask-fab, .modal .modal-backdrop, .modal .ask { animation: none !important; }
}