/* FlyNest content pages (guides, situations, compare, tools). Tokens mirror styles.css / the app theme. */
:root {
  --ink: #1E3550;
  --ink-2: #4A5D75;
  --muted: #8696A8;
  --primary: #1F7BD1;
  --primary-dark: #165FA3;
  --yellow: #FFE45C;
  --page: #F6FAFE;
  --tile: #F2F8FE;
  --card: #FFFFFF;
  --border: #DCE8F3;
  --online: #2FA77A;
  --shadow: 0 10px 24px rgba(30, 53, 80, .10), 0 2px 6px rgba(30, 53, 80, .06);
  --font: ui-rounded, "SF Pro Rounded", Nunito, system-ui, sans-serif;
  --lvl-0: #2FA77A; --lvl-1: #8CC63F; --lvl-2: #F2C230; --lvl-3: #F08A24; --lvl-4: #D9483B; --lvl-na: #B8C4D2;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--page); color: var(--ink); font-family: var(--font); -webkit-font-smoothing: antialiased; }
img { display: block; max-width: 100%; height: auto; }
a { color: var(--primary); }
a:hover { color: var(--primary-dark); }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }
.wrap--narrow { max-width: 780px; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 46px; padding: 0 22px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font: inherit; font-size: 16px; font-weight: 900; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--primary-dark); color: #fff; }
.btn--small { min-height: 40px; padding: 0 18px; font-size: 15px; }
.btn--big { min-height: 54px; padding: 0 30px; font-size: 18px; }
.btn--ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--border); }
.btn--ghost:hover { background: var(--tile); color: var(--ink); }

/* Header with section menus */
.site-header { position: sticky; top: 0; z-index: 20; background: rgba(246, 250, 254, .94); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.site-header__row { display: flex; align-items: center; gap: 20px; min-height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.brand img { border-radius: 9px; }
.brand span { font-size: 21px; font-weight: 900; color: var(--ink); }
.site-nav { display: flex; gap: 4px; margin-left: auto; }
.menu { position: relative; }
.menu__top { display: block; padding: 10px 12px; border-radius: 12px; color: var(--ink-2); font-weight: 800; font-size: 15px; text-decoration: none; }
.menu__top:hover, .menu__top[aria-current] { color: var(--primary); }
.menu__panel { position: absolute; top: 100%; left: -8px; z-index: 30; display: none; min-width: 280px; padding: 10px; border-radius: 18px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.menu:hover .menu__panel, .menu:focus-within .menu__panel { display: flex; flex-direction: column; }
.menu__panel a { padding: 8px 10px; border-radius: 10px; color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.menu__panel a:hover { background: var(--tile); color: var(--primary); }
.menu__panel .menu__all { margin-top: 4px; color: var(--primary); font-weight: 900; }
.mobile-menu { display: none; position: relative; }
.mobile-menu summary { display: flex; flex-direction: column; justify-content: center; gap: 5px; width: 44px; height: 44px; padding: 0 11px; border-radius: 12px; cursor: pointer; list-style: none; }
.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary span { display: block; height: 3px; border-radius: 2px; background: var(--ink); }
.mobile-menu nav { position: absolute; right: 0; top: 52px; display: flex; flex-direction: column; min-width: 220px; padding: 10px; border-radius: 18px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.mobile-menu nav a { padding: 10px 12px; border-radius: 10px; color: var(--ink); font-weight: 800; text-decoration: none; }

/* Mega footer: every page, by section */
.site-footer { margin-top: 64px; padding: 48px 0 32px; background: #fff; border-top: 1px solid var(--border); }
.site-footer__top { display: flex; justify-content: space-between; gap: 32px; padding-bottom: 32px; border-bottom: 1px solid var(--border); }
.site-footer__brand { max-width: 360px; }
.site-footer__brand p { margin: 12px 0 16px; color: var(--ink-2); font-weight: 700; line-height: 1.5; }
.site-footer__grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 28px; padding-top: 32px; }
.site-footer nav { display: flex; flex-direction: column; gap: 9px; }
.site-footer nav strong, .site-footer nav strong a { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); text-decoration: none; }
.site-footer nav a { color: var(--ink); font-size: 14px; font-weight: 700; line-height: 1.35; text-decoration: none; }
.site-footer nav a:hover { color: var(--primary); }
.site-footer__fine { margin-top: 32px; font-size: 13px; font-weight: 700; color: var(--muted); }

/* Article */
.article { padding: 28px 0 8px; }
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; font-size: 14px; font-weight: 800; color: var(--muted); }
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--primary); }
.article h1, .hub h1 { margin: 18px 0 12px; font-size: 44px; line-height: 1.1; font-weight: 900; letter-spacing: -.02em; }
.dek { margin: 0 0 14px; font-size: 20px; line-height: 1.5; font-weight: 700; color: var(--ink-2); }
.byline-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin: 0 0 20px; }
.byline { margin: 0; font-size: 14px; font-weight: 800; color: var(--muted); }
.toc { margin: 0 0 28px; padding: 18px 22px; border-radius: 18px; background: var(--tile); border: 1px solid var(--border); }
.toc strong { font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.toc ol { margin: 10px 0 0; padding-left: 20px; }
.toc li { margin: 6px 0; font-weight: 800; }
.toc a { text-decoration: none; }
.prose { font-size: 18px; line-height: 1.7; font-weight: 600; color: var(--ink); }
.prose h2 { margin: 44px 0 12px; font-size: 30px; line-height: 1.2; font-weight: 900; letter-spacing: -.01em; scroll-margin-top: 84px; }
.prose h3 { margin: 30px 0 8px; font-size: 22px; line-height: 1.3; font-weight: 900; scroll-margin-top: 84px; }
.prose h4 { margin: 24px 0 6px; font-size: 18px; font-weight: 900; }
.prose p { margin: 0 0 16px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 24px; }
.prose li { margin: 6px 0; }
.prose strong { font-weight: 900; }
.prose code { padding: 2px 6px; border-radius: 6px; background: var(--tile); font-size: .9em; }
.callout { margin: 24px 0; padding: 18px 22px; border-radius: 18px; background: #FFF9D9; border: 1px solid #F3E39A; }
.callout p:last-child { margin-bottom: 0; }
.table-wrap { margin: 20px 0 24px; overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 16px; }
th, td { padding: 12px 14px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--border); }
th { background: var(--tile); font-weight: 900; }
tr:last-child td { border-bottom: 0; }

.hero-img { width: 100%; height: auto; margin: 0 0 28px; border-radius: 22px; box-shadow: var(--shadow); aspect-ratio: 1200 / 630; object-fit: cover; }
.share-bar { display: flex; gap: 8px; }
.share-btn { min-height: 36px; padding: 0 14px; border: 0; border-radius: 999px; background: var(--primary); color: #fff; font: inherit; font-size: 14px; font-weight: 900; cursor: pointer; }
.share-btn:hover { background: var(--primary-dark); }
.share-btn--ghost { background: #fff; color: var(--ink); box-shadow: inset 0 0 0 2px var(--border); }
.share-btn--ghost:hover { background: var(--tile); }
.keep-exploring { margin: 28px 0; padding: 18px 22px; border-radius: 18px; background: var(--tile); border: 1px solid var(--border); }
.keep-exploring strong { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.keep-exploring ul { margin: 8px 0 0; padding-left: 20px; }
.keep-exploring li { margin: 6px 0; font-size: 17px; font-weight: 800; }
.sources { font-size: 15px; }
.sources li { margin: 6px 0; }
.hook { margin: 36px 0; padding: 26px 26px 22px; border-radius: 24px; background: var(--ink); color: #fff; }
.hook__label { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .08em; color: var(--yellow); }
.hook p { margin: 8px 0 16px; font-size: 24px; line-height: 1.35; font-weight: 900; }
.hook .share-btn { background: #fff; color: var(--ink); }
.shots { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 14px; margin: 26px 0; }
.shots img { width: 100%; height: auto; border-radius: 18px; box-shadow: var(--shadow); }
.shots figcaption { grid-column: 1 / -1; font-size: 14px; font-weight: 700; color: var(--muted); }
.child-guides { margin-top: 36px; }
.child-guides h2 { font-size: 26px; font-weight: 900; }
.hub-group { margin-top: 36px; }
.hub-group h2 { margin: 0 0 8px; font-size: 26px; font-weight: 900; }
.hub-item { padding: 18px 0; border-bottom: 1px solid var(--border); }
.hub-item h3 { margin: 0 0 6px; font-size: 21px; line-height: 1.3; font-weight: 900; }
.hub-item h3 a { color: var(--ink); text-decoration: none; }
.hub-item h3 a:hover { color: var(--primary); }
.hub-item p { margin: 0; font-size: 16px; line-height: 1.55; font-weight: 700; color: var(--ink-2); }

/* CTAs */
.cta-inline { display: flex; align-items: center; gap: 16px; margin: 28px 0; padding: 18px 20px; border-radius: 22px; background: #fff; box-shadow: var(--shadow); border: 1px solid var(--border); }
.cta-inline div { display: flex; flex-direction: column; gap: 4px; flex: 1; font-size: 15px; line-height: 1.45; }
.cta-inline strong { font-size: 17px; font-weight: 900; }
.cta-inline span { color: var(--ink-2); font-weight: 700; }
.cta-end { display: flex; align-items: center; gap: 28px; margin: 48px 0 8px; padding: 32px; border-radius: 28px; background: linear-gradient(160deg, #3D97E6, #7FC3F4); color: #fff; }
.cta-end h2 { margin: 0 0 10px; font-size: 30px; line-height: 1.15; font-weight: 900; }
.cta-end p { margin: 0 0 18px; font-size: 17px; line-height: 1.5; font-weight: 700; }
.cta-end .btn { background: #fff; color: var(--ink); }
.cta-end .btn:hover { background: var(--yellow); }

/* Hubs and related cards */
.hub { padding: 28px 0 8px; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; margin-top: 24px; }
.card-link { display: flex; flex-direction: column; gap: 8px; padding: 20px; border-radius: 20px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); color: var(--ink); text-decoration: none; transition: transform .15s ease; }
.card-link:hover { transform: translateY(-2px); color: var(--ink); }
.card-link__kicker { font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .07em; color: var(--primary); }
.card-link strong { font-size: 19px; line-height: 1.3; font-weight: 900; }
.card-link span:last-child { color: var(--ink-2); font-size: 15px; line-height: 1.45; font-weight: 700; }
.related { margin-top: 48px; }
.related h2 { font-size: 26px; font-weight: 900; }

/* Turbulence tool */
.article--tool .wrap--narrow { max-width: 980px; }
.tool { margin: 8px 0 32px; padding: 24px; border-radius: 26px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); }
.tool-form { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1.3fr) minmax(150px, 1fr) minmax(120px, .8fr) auto; gap: 12px; align-items: end; }
.tool-field { display: flex; flex-direction: column; gap: 6px; position: relative; }
.tool-field label { font-size: 13px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.tool-field input { height: 50px; padding: 0 14px; border-radius: 14px; border: 2px solid var(--border); background: var(--page); color: var(--ink); font: inherit; font-size: 17px; font-weight: 800; }
.tool-field input:focus { outline: none; border-color: var(--primary); background: #fff; }
.tool-form .btn { height: 50px; }
.suggest { position: absolute; top: 100%; left: 0; right: 0; z-index: 5; margin: 6px 0 0; padding: 6px; list-style: none; border-radius: 14px; background: #fff; border: 1px solid var(--border); box-shadow: var(--shadow); max-height: 300px; overflow-y: auto; }
.suggest li { display: flex; gap: 10px; align-items: baseline; padding: 9px 10px; border-radius: 10px; cursor: pointer; font-weight: 700; font-size: 15px; }
.suggest li b { min-width: 38px; font-weight: 900; color: var(--primary); }
.suggest li span { color: var(--ink-2); }
.suggest li[aria-selected="true"], .suggest li:hover { background: var(--tile); }
.tool-hint { margin: 12px 0 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.tool-error { margin: 14px 0 0; padding: 12px 16px; border-radius: 14px; background: #FDECEA; color: #8C1D18; font-weight: 800; }
.tool-loading { display: flex; align-items: center; gap: 12px; margin: 22px 0 0; font-weight: 800; color: var(--ink-2); }
.tool-loading::before { content: ""; width: 22px; height: 22px; border-radius: 50%; border: 3px solid var(--border); border-top-color: var(--primary); animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.result { margin-top: 26px; }
.verdict { display: flex; gap: 18px; align-items: center; padding: 20px; border-radius: 20px; background: var(--tile); }
.verdict__badge { flex: none; display: grid; place-items: center; width: 78px; height: 78px; border-radius: 22px; color: #fff; font-size: 13px; font-weight: 900; text-align: center; line-height: 1.15; padding: 6px; }
.verdict h2 { margin: 0 0 6px; font-size: 24px; line-height: 1.25; font-weight: 900; }
.verdict p { margin: 0; font-size: 16px; line-height: 1.5; font-weight: 700; color: var(--ink-2); }
.route-map { margin: 18px 0 0; border-radius: 20px; overflow: hidden; background: #CDE7FA; aspect-ratio: 2 / 1; }
.route-map svg { display: block; width: 100%; height: 100%; }
.timeline { margin: 20px 0 6px; }
.timeline__bar { display: flex; height: 18px; border-radius: 999px; overflow: hidden; background: var(--lvl-na); }
.timeline__bar span { flex: 1; }
.timeline__ticks { display: flex; justify-content: space-between; margin-top: 6px; font-size: 13px; font-weight: 800; color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 12px 0 0; font-size: 13px; font-weight: 800; color: var(--ink-2); }
.legend i { display: inline-block; width: 12px; height: 12px; margin-right: 6px; border-radius: 4px; vertical-align: -1px; }
.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin: 20px 0 0; }
.fact { padding: 14px 16px; border-radius: 16px; border: 1px solid var(--border); }
.fact small { display: block; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.fact strong { display: block; margin-top: 4px; font-size: 18px; font-weight: 900; }
.fact span { display: block; margin-top: 2px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.patches { margin: 22px 0 0; padding: 0; list-style: none; }
.patches li { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--border); font-size: 16px; line-height: 1.45; font-weight: 700; }
.patches li i { flex: none; width: 12px; height: 12px; margin-top: 6px; border-radius: 4px; }
.result-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }

@media (max-width: 1020px) {
  .tool-form { grid-template-columns: 1fr 1fr; }
  .tool-form .btn { grid-column: 1 / -1; }
}
@media (max-width: 900px) {
  .site-nav { display: none; }
  .mobile-menu { display: block; }
  .site-header__row .btn { margin-left: auto; }
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
  .site-footer__top { flex-direction: column; }
  .tool-form { grid-template-columns: 1fr 1fr; }
  .tool-form .btn { grid-column: 1 / -1; }
  .facts { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .wrap { padding: 0 16px; }
  .article h1, .hub h1 { font-size: 32px; }
  .dek { font-size: 18px; }
  .prose { font-size: 17px; }
  .prose h2 { font-size: 25px; }
  .cta-inline { flex-wrap: wrap; }
  .cta-inline .btn { width: 100%; }
  .cta-end { flex-direction: column; text-align: center; padding: 26px 20px; }
  .tool { padding: 16px; }
  .tool-form { grid-template-columns: 1fr; }
  .verdict { flex-direction: column; align-items: flex-start; }
  .route-map { aspect-ratio: 4 / 3; }
  .site-footer__grid { grid-template-columns: 1fr; }
}
