/* FirmSideAI chrome: tokens, header, footer. Loaded by every page, including the frozen legacy pages,
   so navigation and footer cannot drift. Classes are prefixed fx- so they never collide with legacy styles.
   Palette: the house FirmSideAI system run light-first ("daylight"); dark values follow the visitor's device. */
:root {
  --paper: #f5f7f4; --paper-2: #e9eee8; --card: #ffffff;
  --ink: #0b1a11; --ink-2: #3d5246; --ink-3: #566b5f; --rule: #d3ddd5;
  --mint: #0d7a44; --mint-hi: #34d67a; --mint-wash: #dff3e6;
  --amber: #8a5a00; --amber-wash: #fbefd4;
  --band: #06120a; --band-2: #0e1f16; --band-ink: #f2fff6; --band-ink-2: #a9cdb6; --band-rule: #1f4a2f;
  --link-serp: #1a0dab;
  --display: "Rajdhani", "Rajdhani Fallback A", "Rajdhani Fallback R", system-ui, sans-serif;
  --body: "IBM Plex Sans", "Plex Fallback A", "Plex Fallback R", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, Menlo, monospace;
  --wrap: 78rem;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #07110b; --paper-2: #0c1b12; --card: #0e1f16;
    --ink: #eef8f1; --ink-2: #b9d3c2; --ink-3: #93b29f; --rule: #1f3a2a;
    --mint: #5cdd89; --mint-wash: #133523; --amber: #e0b341; --amber-wash: #2c2410;
    --band: #000000; --link-serp: #8ab4f8; color-scheme: dark;
  }
}
/* Legacy pages are dark by design; their chrome takes the dark values whatever the device says. */
.fx-dark {
  --paper: #000000; --paper-2: #0c1b12; --card: #0e1f16;
  --ink: #eef8f1; --ink-2: #b9d3c2; --ink-3: #93b29f; --rule: #1f3a2a;
  --mint: #5cdd89; --mint-wash: #133523;
}

.fx-skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; border-radius: 6px; font: 600 0.95rem var(--body); text-decoration: none; }
.fx-skip:focus { top: 12px; }

.fx-head { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 60; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--rule); font-family: var(--body); }
.fx-wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: 20px; }
.fx-head .fx-wrap { display: flex; align-items: center; gap: 1.1rem; min-height: 64px; position: relative; }
.fx-logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; flex: none; min-height: 44px; }
.fx-bars { display: inline-flex; align-items: flex-end; gap: 2px; height: 20px; }
.fx-bars i { width: 3px; border-radius: 2px; background: linear-gradient(#5cdd89, #0d7a44); transform-origin: bottom; animation: fx-bar 2.6s ease-in-out infinite; }
.fx-bars i:nth-child(1) { height: 9px; } .fx-bars i:nth-child(2) { height: 16px; animation-duration: 2.2s; animation-delay: -0.4s; }
.fx-bars i:nth-child(3) { height: 20px; animation-duration: 2.9s; animation-delay: -0.8s; } .fx-bars i:nth-child(4) { height: 13px; animation-duration: 2.4s; animation-delay: -1.1s; }
@keyframes fx-bar { 50% { transform: scaleY(0.72); } }
.fx-word { font: 700 18px/1 var(--display); letter-spacing: 0.24em; color: var(--ink); }
.fx-ai { font: 700 12px/1 var(--display); letter-spacing: 0.08em; color: #06120a; background: linear-gradient(135deg, #7be3d8, #95b6ff); padding: 3px 6px; border-radius: 999px; margin-left: -6px; }
/* FB-8: a hamburger menu at every width. The panel drops under the header: four groups in a row on desktop,
   stacked on phones. Closed, it is display:none, so it is out of the tab order and hidden from assistive tech. */
.fx-cta { display: inline-flex; align-items: center; min-height: 42px; padding: 0 1rem; border-radius: 6px; background: var(--mint); color: var(--paper); font: 600 0.95rem var(--body); text-decoration: none; flex: none; margin-left: auto; }
.fx-cta:hover { filter: brightness(1.08); }
.fx-menu { display: inline-flex; align-items: center; gap: 0.55rem; min-height: 44px; padding: 0 0.9rem; border: 1.5px solid var(--rule); border-radius: 6px; background: transparent; color: var(--ink); font: 600 0.95rem var(--body); cursor: pointer; }
.fx-menu:hover { border-color: var(--mint); color: var(--mint); }
.fx-burger { position: relative; width: 20px; height: 14px; display: inline-block; }
.fx-burger i { position: absolute; left: 0; width: 20px; height: 2px; border-radius: 2px; background: currentColor; transition: transform 200ms ease, opacity 200ms ease, top 200ms ease; }
.fx-burger i:nth-child(1) { top: 0; } .fx-burger i:nth-child(2) { top: 6px; } .fx-burger i:nth-child(3) { top: 12px; }
.fx-head.open .fx-burger i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.fx-head.open .fx-burger i:nth-child(2) { opacity: 0; }
.fx-head.open .fx-burger i:nth-child(3) { top: 6px; transform: rotate(-45deg); }
.fx-nav { display: none; }
.fx-head.open .fx-nav { display: grid; gap: 1.2rem; position: absolute; top: 100%; left: 0; right: 0; max-height: calc(100vh - 72px); overflow-y: auto; background: var(--paper); border: 1px solid var(--rule); border-top: 0; border-radius: 0 0 14px 14px; padding: 1.4rem 20px 1.3rem; box-shadow: 0 30px 60px -30px rgba(11, 26, 17, 0.55); }
.fx-groups { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1.4rem; }
.fx-gh { display: inline-block; font: 600 1.25rem/1.2 var(--display); color: var(--ink); text-decoration: none; padding-block: 0.3rem; border-bottom: 2px solid var(--mint); }
.fx-gh:hover, .fx-gh[aria-current="page"] { color: var(--mint); }
.fx-group ul { list-style: none; margin: 0.6rem 0 0; padding: 0; display: grid; gap: 0.15rem; }
.fx-group li a { display: block; padding: 0.45rem 0; color: var(--ink-2); text-decoration: none; font-size: 1rem; line-height: 1.35; }
.fx-group li a:hover { color: var(--mint); text-decoration: underline; text-underline-offset: 4px; }
.fx-more { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 1.4rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.fx-more a:not(.fx-cta) { color: var(--ink-2); text-decoration: none; font-weight: 500; padding-block: 0.5rem; }
.fx-more a:not(.fx-cta):hover { color: var(--mint); }
.fx-more .fx-cta { display: none; }
@media (max-width: 960px) { .fx-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) {
  .fx-head .fx-wrap > .fx-cta { display: none; }
  .fx-menu { margin-left: auto; }
  .fx-groups { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .fx-more .fx-cta { display: inline-flex; width: 100%; justify-content: center; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .fx-burger i { transition: none; } }
.fx-head :focus-visible, .fx-foot :focus-visible, .fx-skip:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 4px; }

.fx-foot { background: var(--paper); color: var(--ink-3); border-top: 1px solid var(--rule); padding-block: 3rem 2.5rem; font: 400 0.92rem/1.6 var(--body); }
.fx-grid { display: grid; grid-template-columns: 1.4fr repeat(3, 1fr); gap: 2rem; }
.fx-grid h2 { margin: 0 0 0.6rem; font: 600 0.75rem/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-2); }
.fx-grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.15rem; }
.fx-grid a { color: var(--ink-3); text-decoration: none; display: inline-block; padding-block: 0.25rem; }
.fx-grid a:hover { color: var(--mint); }
.fx-grid p { margin: 0.7rem 0 0; }
.fx-also { margin-top: 2rem; padding-top: 1.2rem; border-top: 1px solid var(--rule); display: flex; flex-wrap: wrap; gap: 0.3rem 1.4rem; }
.fx-also a { color: var(--ink-2); padding-block: 0.25rem; }
.fx-fine { margin: 1.2rem 0 0; font: 400 0.8rem/1.5 var(--mono); }
@media (max-width: 860px) { .fx-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .fx-grid { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .fx-bars i { animation: none; } }
