/* ===== FG-COMPASS landing page ===== */
:root {
  --fg-navy: #10364C;
  --fg-teal: #398D90;
  --fg-teal-ink: #24696C;
  --fg-amber: #F9A73E;
  --fg-ink: #172A38;
  --fg-muted: #4A5F6E;
  --fg-paper: #F5F8F9;
  --fg-alt: #E8F1F2;
  --fg-card: #fff;
  --fg-line: #D6E2E6;
  --fg-hero-a: #093657;
  --fg-hero-m: #0E4963;
  --fg-hero-b: #266B6A;
  --fg-shadow: 0 10px 30px rgba(16, 54, 76, .10);
}
body.quarto-dark {
  --fg-navy: #FFFFFF;
  --fg-teal: #2EC7BC;
  --fg-teal-ink: #2EC7BC;
  --fg-amber: #F9A73E;
  --fg-ink: #D1E0E6;
  --fg-muted: #A4C2CA;
  --fg-paper: #071F31;
  --fg-alt: #0B2E45;
  --fg-card: #103C53;
  --fg-line: #1E4A62;
  --fg-hero-a: #073753;
  --fg-hero-m: #105568;
  --fg-hero-b: #286D69;
  --fg-shadow: 0 10px 30px rgba(0, 0, 0, .35);
}

/* Remove default top spacing on the landing page */
#quarto-content:has(.fg-hero) { padding-top: 0; }
main.content:has(.fg-hero) { margin-top: 0; padding-top: 0; }
main.content:has(.fg-hero) > section,
main.content:has(.fg-hero) .cell-output-display > section { margin: 0; }

.fg-wrap { max-width: 1140px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 768px) { .fg-wrap { padding: 0 32px; } }

.fg-section { padding: 72px 0; }
.fg-alt { background: var(--fg-alt); }
.fg-section h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); line-height: 1.2; font-weight: 800; letter-spacing: -.02em; margin: 0 0 1rem; border: 0; }
.fg-section h3 { font-size: 1.15rem; margin: .5rem 0; }
.fg-kicker {
  text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; font-weight: 600;
  color: var(--fg-teal-ink); margin-bottom: .5rem;
}
.fg-sub { color: var(--fg-muted); margin-bottom: 2rem; }
.fg-prose { color: var(--fg-ink); font-size: 1.05rem; line-height: 1.7; }
.fg-two { display: grid; gap: 2rem; }
@media (min-width: 900px) { .fg-two { grid-template-columns: 5fr 6fr; gap: 4rem; align-items: start; } }

/* ----- Hero ----- */
.fg-hero {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(46,199,188,.10), transparent 60%),
    linear-gradient(120deg, var(--fg-hero-a) 0%, var(--fg-hero-m) 52%, var(--fg-hero-b) 100%);
  color: #fff;
  padding: 64px 0 72px;
}
.fg-hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 992px) { .fg-hero-grid { grid-template-columns: 7fr 5fr; gap: 4rem; } .fg-hero { padding: 96px 0 104px; } }
.fg-eyebrow {
  display: inline-block; font-size: .8rem; font-weight: 600; letter-spacing: .08em; text-transform: uppercase;
  color: #FBB65D; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.18);
  padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1.25rem;
}
.fg-hero h1 {
  color: #fff; font-size: clamp(2rem, 4.2vw, 3.1rem); line-height: 1.1; font-weight: 800;
  letter-spacing: -.03em; margin: 0 0 1.25rem;
}
.fg-lead { font-size: clamp(1.05rem, 1.6vw, 1.25rem); line-height: 1.6; color: rgba(255,255,255,.88); max-width: 40em; }
.fg-lead strong { color: #fff; }
.fg-cta { display: flex; flex-wrap: wrap; gap: .75rem; margin: 2rem 0 1rem; }
.fg-cta .btn { font-weight: 600; border-radius: .7rem; padding: .8rem 1.3rem; font-size: 1rem; }
.fg-cta .btn i { margin-right: .4rem; }
.fg-cta .btn-primary { background: var(--fg-amber); border-color: var(--fg-amber); color: #082B42; }
.fg-cta .btn-primary:hover, .fg-cta .btn-primary:focus { background: #FBB65D; border-color: #FBB65D; color: #082B42; }
.fg-cta .btn-outline-secondary { color: #fff; border-color: rgba(255,255,255,.55); background: transparent; }
.fg-cta .btn-outline-secondary:hover, .fg-cta .btn-outline-secondary:focus { background: rgba(255,255,255,.12); color: #fff; border-color: #fff; }
.fg-hero-note { font-size: .9rem; color: rgba(255,255,255,.7); margin: 0; }

/* ----- Interactive demo ----- */
.fg-demo {
  background: #fff; color: #172A38; border-radius: 1.1rem; padding: 1.5rem;
  box-shadow: 0 24px 60px rgba(0,0,0,.28); min-height: 300px; display: flex; flex-direction: column;
}
body.quarto-dark .fg-demo { background: #103C53; color: #e7eef4; }
.fg-demo-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.fg-demo-tag {
  background: #fff3df; color: #8a5300; font-weight: 700; font-size: .75rem; text-transform: uppercase;
  letter-spacing: .1em; padding: .25rem .6rem; border-radius: 999px;
}
.fg-demo-skill { font-weight: 600; font-size: .95rem; color: #10364C; font-family: "Inter", sans-serif; }
body.quarto-dark .fg-demo-skill { color: #e7eef4; }
.fg-demo-step { font-size: .8rem; color: #6b7a86; margin: 0 0 .35rem; text-transform: uppercase; letter-spacing: .08em; }
body.quarto-dark .fg-demo-step { color: #A4C2CA; }
.fg-demo-q { font-family: "Inter", sans-serif; font-size: 1.25rem; line-height: 1.4; font-weight: 500; margin: 0 0 1.25rem; min-height: 3.5em; }
.fg-demo-btns { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.fg-demo-btns .btn { padding: .75rem; font-weight: 600; border-radius: .7rem; font-size: 1rem; border: 2px solid; }
.fg-yes { background: #24696C; border-color: #24696C !important; color: #fff; }
.fg-yes:hover, .fg-yes:focus { background: #1D5659; color: #fff; }
.fg-no { background: transparent; border-color: #c7d3da !important; color: inherit; }
.fg-no:hover, .fg-no:focus { background: rgba(36,105,108,.08); color: inherit; }
.fg-demo-result { display: flex; gap: 1rem; align-items: center; margin-bottom: .5rem; }
.fg-demo-result[hidden], .fg-demo-btns[hidden], .fg-demo-q[hidden], .fg-demo-reset[hidden] { display: none !important; }
.fg-level-badge {
  flex: 0 0 auto; width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center;
  font-family: "Inter", sans-serif; font-size: 2rem; font-weight: 700; color: #082B42; background: #F9A73E;
}
.fg-demo-level-name { font-family: "Inter", sans-serif; font-weight: 600; font-size: 1.15rem; margin: 0 0 .2rem; }
.fg-demo-level-desc { margin: 0; color: #4A5F6E; font-size: .95rem; line-height: 1.5; }
body.quarto-dark .fg-demo-level-desc { color: #b5c3cf; }
.fg-demo-foot { margin-top: auto; padding-top: 1.25rem; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.fg-demo-track { display: flex; gap: .35rem; }
.fg-demo-track span {
  width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: .8rem; font-weight: 600;
  background: #eef2f4; color: #6b7a86; transition: all .2s ease;
}
body.quarto-dark .fg-demo-track span { background: #1E4A62; color: #A4C2CA; }
.fg-demo-track span.on { background: #F9A73E; color: #082B42; transform: translateY(-2px); }
.fg-demo-reset { background: none; border: 0; color: #1D5659; font-weight: 600; padding: .25rem; }
body.quarto-dark .fg-demo-reset { color: #2EC7BC; }

/* ----- Stats strip ----- */
.fg-stats { background: var(--fg-card); border-bottom: 1px solid var(--fg-line); }
.fg-stats-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.25rem 1rem; padding-top: 28px; padding-bottom: 28px; }
@media (min-width: 768px) { .fg-stats-grid { grid-template-columns: repeat(5, 1fr); } }
.fg-stats-grid > div { display: flex; flex-direction: column; }
.fg-stats-grid strong { font-family: "Inter", sans-serif; font-size: 1.9rem; line-height: 1.1; color: var(--fg-teal-ink); }
.fg-stats-grid span { font-size: .9rem; color: var(--fg-muted); }
.fg-stats-grid > div:last-child { grid-column: 1 / -1; }
@media (min-width: 768px) { .fg-stats-grid > div:last-child { grid-column: auto; } }

/* ----- Steps ----- */
.fg-steps { list-style: none; padding: 0; margin: 2rem 0 0; display: grid; gap: 1.25rem; counter-reset: step; }
@media (min-width: 768px) { .fg-steps { grid-template-columns: repeat(3, 1fr); } }
.fg-steps li {
  background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: 1rem; padding: 1.5rem;
  position: relative; counter-increment: step;
}
.fg-steps li::before {
  content: counter(step); position: absolute; top: 1.25rem; right: 1.25rem; font-family: "Inter", sans-serif;
  font-weight: 700; font-size: 2.2rem; color: var(--fg-line); line-height: 1;
}
.fg-steps p { color: var(--fg-muted); margin: 0; }
.fg-step-icon {
  display: inline-grid; place-items: center; width: 48px; height: 48px; border-radius: 12px;
  background: rgba(36,105,108,.12); color: var(--fg-teal-ink); font-size: 1.4rem;
}

/* ----- Researcher details ----- */
.fg-details { margin-top: 2rem; background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: 1rem; }
.fg-details summary {
  cursor: pointer; padding: 1.1rem 1.5rem; font-weight: 600; font-family: "Inter", sans-serif; color: var(--fg-navy);
  list-style: none; display: flex; align-items: center; gap: .6rem;
}
.fg-details summary::-webkit-details-marker { display: none; }
.fg-details summary::after { content: "+"; margin-left: auto; font-size: 1.4rem; color: var(--fg-teal-ink); }
.fg-details[open] summary::after { content: "–"; }
.fg-details-body { padding: 0 1.5rem 1.5rem; display: grid; gap: 1.5rem; }
@media (min-width: 900px) { .fg-details-body { grid-template-columns: 1fr 1fr; align-items: center; } }
.fg-figure { margin: 0; }
.fg-figure img { width: 100%; height: auto; border-radius: .6rem; background: #fff; padding: .5rem; border: 1px solid var(--fg-line); }
.fg-figure figcaption { font-size: .85rem; color: var(--fg-muted); margin-top: .5rem; }

/* ----- Skills ----- */
.fg-skills { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 768px) { .fg-skills { grid-template-columns: 1fr 1fr; } }
.fg-skill-card { background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: 1rem; padding: 1.75rem; }
.fg-skill-card h3 { display: flex; align-items: center; gap: .5rem; font-size: 1.3rem; }
.fg-skill-card h3 i { color: var(--fg-teal-ink); }
.fg-skill-card > p { color: var(--fg-muted); }
.fg-chips { list-style: none; padding: 0; margin: 1rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.fg-chips li {
  background: var(--fg-alt); border: 1px solid var(--fg-line); padding: .4rem .85rem; border-radius: 999px;
  font-size: .95rem; font-weight: 500;
}

/* ----- Levels ----- */
.fg-levels { display: grid; gap: 1.25rem; grid-template-columns: 1fr; }
@media (min-width: 640px) { .fg-levels { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1100px) { .fg-levels { grid-template-columns: repeat(4, 1fr); } }
.fg-level { margin: 0; background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: 1rem; overflow: hidden; }
.fg-level img { width: 100%; aspect-ratio: 16 / 7; object-fit: contain; background: #fff; padding: .75rem; border-bottom: 1px solid var(--fg-line); }
.fg-level figcaption { padding: 1rem 1.1rem 1.2rem; font-size: .95rem; color: var(--fg-muted); line-height: 1.5; }
.fg-level figcaption strong { display: block; color: var(--fg-navy); font-family: "Inter", sans-serif; font-size: 1.1rem; margin-bottom: .25rem; }
.fg-level-num {
  float: left; width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; margin-right: .75rem;
  background: var(--fg-amber); color: #082B42; font-weight: 700; font-family: "Inter", sans-serif;
}

/* ----- Audience cards ----- */
.fg-cards { display: grid; gap: 1.25rem; margin-top: 2rem; }
@media (min-width: 768px) { .fg-cards { grid-template-columns: repeat(3, 1fr); } }
.fg-card {
  background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: 1rem; padding: 1.75rem;
  box-shadow: var(--fg-shadow);
}
.fg-card > i { font-size: 1.8rem; color: var(--fg-teal-ink); }
.fg-card p { color: var(--fg-muted); margin: 0; }

/* ----- Evidence ----- */
.fg-papers { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.fg-papers li {
  background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: .9rem; padding: 1rem 1.25rem;
  display: grid; grid-template-columns: auto 1fr; column-gap: 1rem; row-gap: .15rem;
}
.fg-paper-year { grid-row: span 2; font-family: "Inter", sans-serif; font-weight: 700; color: var(--fg-teal-ink); font-size: 1.05rem; }
.fg-papers a { font-weight: 600; color: var(--fg-navy); text-decoration: none; line-height: 1.4; }
.fg-papers a:hover { text-decoration: underline; color: var(--fg-teal-ink); }
.fg-paper-src { font-size: .88rem; color: var(--fg-muted); font-style: italic; }
.fg-link { font-weight: 600; text-decoration: none; color: var(--fg-teal-ink); display: inline-block; margin-top: 1rem; }

/* ----- Get started ----- */
.fg-final {
  background:
    radial-gradient(1200px 500px at 85% -10%, rgba(46,199,188,.10), transparent 60%),
    linear-gradient(120deg, var(--fg-hero-a) 0%, var(--fg-hero-m) 52%, var(--fg-hero-b) 100%);
  color: #fff;
}
.fg-final h2 { color: #fff; }
.fg-start { display: grid; gap: 1rem; margin-top: 1.5rem; }
@media (min-width: 768px) { .fg-start { grid-template-columns: repeat(3, 1fr); } }
.fg-start-card {
  display: flex; flex-direction: column; gap: .35rem; padding: 1.5rem; border-radius: 1rem; text-decoration: none;
  background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.2); color: #fff; transition: all .2s ease;
}
.fg-start-card:hover, .fg-start-card:focus { background: rgba(255,255,255,.16); color: #fff; transform: translateY(-2px); }
.fg-start-card i { font-size: 1.6rem; color: #FBB65D; }
.fg-start-card strong { font-family: "Inter", sans-serif; font-size: 1.15rem; }
.fg-start-card em { font-style: normal; font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; background: #F9A73E; color: #082B42; padding: .1rem .4rem; border-radius: 4px; vertical-align: middle; }
.fg-start-card span { color: rgba(255,255,255,.8); font-size: .95rem; }
.fg-name-note { margin: 2.5rem 0 0; font-size: .85rem; color: rgba(255,255,255,.65); max-width: 52em; }

/* Focus visibility */
.fg-hero a:focus-visible, .fg-hero button:focus-visible, .fg-final a:focus-visible { outline: 3px solid #FBB65D; outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  .fg-demo-track span, .fg-start-card { transition: none; }
}
.fg-level figcaption em { display: block; margin-top: .6rem; padding-top: .6rem; border-top: 1px dashed var(--fg-line); font-style: normal; font-size: .88rem; color: var(--fg-ink); }

/* ----- Animated decision tree ----- */
.fg-tree {
  margin-top: 2rem; background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: 1rem;
  padding: 1.5rem; display: grid; gap: 1rem;
}
@media (min-width: 992px) {
  .fg-tree { grid-template-columns: 4fr 7fr; grid-template-rows: auto auto; column-gap: 2.5rem; align-items: center; padding: 2rem; }
  .fg-tree-head { grid-column: 1; grid-row: 1; align-self: end; }
  .fg-tree-foot { grid-column: 1; grid-row: 2; align-self: start; }
  .fg-tree svg { grid-column: 2; grid-row: 1 / span 2; }
}
.fg-tree-head h3 { font-size: 1.3rem; margin: 0 0 .5rem; }
.fg-tree-head p { color: var(--fg-muted); margin: 0; }
.fg-tree svg { width: 100%; height: auto; display: block; overflow: visible; }
.fg-tree text { font-family: "Inter", sans-serif; font-size: 15px; text-anchor: middle; fill: var(--fg-ink); }
.fg-tree text.k { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; fill: var(--fg-muted); }
.fg-tree text.big { font-family: "Inter", sans-serif; font-weight: 600; font-size: 16px; }
.fg-tree text.s { font-size: 12px; fill: var(--fg-muted); }
.fg-tree text.el { font-size: 12px; font-weight: 600; fill: var(--fg-muted); }
.fg-tree .n rect { fill: var(--fg-alt); stroke: var(--fg-line); stroke-width: 2; transition: fill .35s ease, stroke .35s ease; }
.fg-tree .e path { fill: none; stroke: var(--fg-line); stroke-width: 3; stroke-linecap: round; transition: stroke .35s ease; }
.fg-tree .n.on rect { fill: rgba(36,105,108,.14); stroke: var(--fg-teal); }
.fg-tree .n.lv.on rect { fill: var(--fg-amber); stroke: var(--fg-amber); }
.fg-tree .n.lv.on text { fill: #082B42; }
.fg-tree .e.on path { stroke: var(--fg-teal); stroke-dasharray: 200; animation: fg-draw .5s ease forwards; }
.fg-tree .e.on text { fill: var(--fg-teal-ink); }
@keyframes fg-draw { from { stroke-dashoffset: 200; } to { stroke-dashoffset: 0; } }
.fg-tree-foot { display: flex; flex-direction: column; gap: .75rem; align-items: flex-start; }
.fg-tree-cap { margin: 0; min-height: 3em; font-size: 1rem; color: var(--fg-ink); }
.fg-tree-cap strong { color: var(--fg-teal-ink); }
.fg-tree-toggle {
  background: none; border: 1px solid var(--fg-line); border-radius: 999px; padding: .3rem .9rem;
  font-size: .85rem; font-weight: 600; color: var(--fg-teal-ink);
}
.fg-tree-toggle:hover { background: var(--fg-alt); }
.fg-figcap { font-size: .85rem; color: var(--fg-muted); margin-top: .5rem; }
@media (prefers-reduced-motion: reduce) {
  .fg-tree .e.on path { animation: none; }
  .fg-tree .n rect, .fg-tree .e path { transition: none; }
}
@media (max-width: 575.98px) {
  .fg-tree { padding: 1.1rem; }
  .fg-tree svg { margin: 0 -.4rem; width: calc(100% + .8rem); }
  .fg-tree text { font-size: 19px; }
  .fg-tree text.big { font-size: 22px; }
  .fg-tree text.el { font-size: 17px; }
  .fg-tree text.k, .fg-tree text.s { display: none; }
}
.fg-demo-lang { font-size: .78rem; color: #6b7a86; margin: -.2rem 0 .5rem; font-style: italic; }

/* ===== About page ===== */
.fg-person {
  display: grid; gap: 1.5rem; margin: 1.5rem 0 2.5rem;
  background: var(--fg-card); border: 1px solid var(--fg-line); border-radius: 1rem;
  padding: 1.5rem; box-shadow: var(--fg-shadow);
}
@media (min-width: 768px) { .fg-person { grid-template-columns: 160px 1fr; padding: 2rem; } }
.fg-person p:has(> .fg-person-photo), .fg-person .quarto-figure { margin: 0; }
.fg-person-photo { width: 160px; height: 160px; object-fit: cover; border-radius: 50%; border: 4px solid var(--fg-alt); }
.fg-person-body h3 { margin-top: 0; color: var(--fg-navy); }
.fg-person-role { display: block; color: var(--fg-teal-ink); font-weight: 600; margin: -.25rem 0 1rem; }
.fg-collab-grid { display: grid; gap: 1rem; margin-top: 1.25rem; }
@media (min-width: 768px) { .fg-collab-grid { grid-template-columns: repeat(2, 1fr); } }
.fg-collab {
  background: var(--fg-card); border: 1px solid var(--fg-line); border-left: 4px solid var(--fg-teal);
  border-radius: .75rem; padding: 1.1rem 1.25rem; font-size: .92rem; color: var(--fg-muted);
}
.fg-collab h4 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--fg-navy); }
.fg-collab p { margin: 0; }
