/* Insights (blog) styles — reuses the main site's design tokens so it
   looks native. Fonts are loaded via the Google Fonts <link> in
   inc/public_header.php / inc/app_header.php (same stylesheet the main
   site uses), not self-hosted here. */

:root{
  --radius:10px;
  --cream:#F6F2EB;            /* == site --parchment */
  --parchment:#F6F2EB;        /* alias so CSS copied verbatim from site.css (footer) matches */
  --ink:#1A2535;               /* == site --text-primary, used as body text */
  --teal:#1F7D52;               /* == site --emerald-mid, used for accents/focus */
  --teal-deep:#1A6B45;         /* == site --emerald, used for buttons/links */
  --teal-soft:rgba(36,151,106,0.12); /* == site --emerald-lite */
  --emerald-glow:#24976A;      /* == site --emerald-glow, used by footer legal-panel links */
  --emerald-on-dark:#2FA97C;   /* == site --emerald-on-dark, used by the footer Platforms flyout */
  --shadow-lg:0 20px 60px rgba(12,21,33,0.18); /* == site --shadow-lg, used by the footer Platforms flyout */
  --coral:#B8922A;              /* == site --gold, used for small accents */
  --font-display:"Playfair Display", Georgia, serif;
  --font-sans:"DM Sans", system-ui, -apple-system, sans-serif;
  --border:#E0D9CE;             /* == site --parchment-3 */
  --muted:#EDE8DF;              /* == site --parchment-2 */
  --muted-foreground:#4A5568;   /* == site --text-mid */
  --destructive:#8B2215;        /* == site's rescue/error red */
  --navy:#152236;                /* == site --navy, used for headings */
  --dur:0.3s;                    /* == site --dur, used by footer link/hover transitions */
  --ease:cubic-bezier(0.4,0,0.2,1); /* == site --ease, used by footer legal-panel accordion */
  --max-w:1180px;                /* == site --max-w, used by .container (footer) */
  /* Below: aliases under site.css's OWN variable names (not renamed, unlike
     --teal-soft/--coral above) so the nav-dropdown-*/footer-flyout-* "browse
     by platform" rules further down -- copied verbatim from site.css's top
     nav and footer flyout -- resolve without needing every var() renamed. */
  --emerald-lite:rgba(36,151,106,0.12); /* == --teal-soft above == site --emerald-lite */
  --navy-mid:#1C2F45;            /* == site --navy-mid, nav-dropdown/footer-flyout gradient */
  --gold-lite:#C9A84C;           /* == site --gold-lite, nav-dropdown/footer-flyout eyebrow label */
  --white:#FFFFFF;               /* == site --white */
  --font-mono:"DM Mono", monospace; /* == site --font-mono, nav-dropdown/footer-flyout platform badges (font itself loaded via /assets/fonts/fonts.css) */
  --radius-lg:18px;              /* == site --radius-lg, nav-dropdown/footer-flyout menu corners */
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:var(--font-sans);
  color:var(--ink);
  background:var(--cream);
  line-height:1.7;
  font-size:16px;
  overflow-x:hidden;
}
h1,h2,h3,h4{font-family:var(--font-display);letter-spacing:-.01em;font-weight:500;color:var(--navy);line-height:1.2}
a{color:var(--teal-deep)}
a:hover{color:var(--coral)}
html{scroll-padding-top:112px}
.blog-header{position:sticky;top:0;z-index:50;background:rgba(12,21,33,.96);backdrop-filter:blur(16px) saturate(1.4);border-bottom:1px solid rgba(255,255,255,.06)}
.blog-header-inner{max-width:72rem;margin:0 auto;display:flex;align-items:center;justify-content:space-between;padding:1rem 1.25rem}
/* flex-shrink:0 -- on-device translation of the nav labels can widen
   .blog-nav past its natural size; without this the logo was one of
   the things squeezed to compensate, and since its height stays a
   fixed 68px while a squeezed container caps its width, that distorted
   its aspect ratio (see the matching fix on the main site's .nav-logo
   in site.css). */
.blog-logo{display:flex;align-items:center;gap:.65rem;text-decoration:none;color:#fff;flex-shrink:0}
.blog-logo-img{height:68px;width:auto;display:block}
/* flex-wrap here too (not just under the narrow-viewport media query
   below) so a translated label that runs long has somewhere to go
   besides squeezing the logo or overflowing the header. */
.blog-nav{display:flex;flex-wrap:wrap;row-gap:.5rem;gap:1.25rem;align-items:center;font-size:.9rem}
.blog-nav a{color:rgba(255,255,255,.68);text-decoration:none;font-weight:500}
.blog-nav a:hover{color:#fff}
/* ============================================================ TOP NAV — "Insights" browse-by-platform dropdown
   Copied verbatim from site.css's .nav-item-dropdown/.nav-dropdown-* (the
   main site's top-nav Insights dropdown) -- see insights/inc/public_header.php
   for the matching markup and the aliased --emerald-lite/--navy-mid/
   --gold-lite/--white/--font-mono/--radius-lg variables above that let this
   resolve without renaming anything. .blog-nav has no hamburger-menu
   fallback for narrow phones (see the RESPONSIVE section below), unlike the
   main site's nav, so the small-screen override further down keeps this
   322px-wide popup from overflowing a narrow viewport instead of switching
   to a different mobile layout entirely. */
.nav-item-dropdown { position: relative; }
.nav-dropdown-toggle {
  background: none; border: none; padding: 0.3rem; margin: 0; cursor: pointer;
  color: rgba(255,255,255,0.5); display: inline-flex; align-items: center; justify-content: center;
  transition: color var(--dur); vertical-align: middle;
}
.nav-dropdown-toggle:hover, .nav-dropdown-toggle[aria-expanded="true"] { color: var(--white); }
.nav-dropdown-toggle svg { width: 8px; height: 8px; transition: transform var(--dur) var(--ease); }
.nav-item-dropdown:hover .nav-dropdown-toggle svg,
.nav-item-dropdown:focus-within .nav-dropdown-toggle svg,
.nav-item-dropdown.open .nav-dropdown-toggle svg { transform: rotate(180deg); }
.nav-dropdown-menu {
  position: absolute; top: 100%; left: 50%;
  transform: translate(-50%, -6px);
  width: 322px; background: linear-gradient(165deg, var(--navy) 0%, var(--navy-mid) 100%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); list-style: none;
  padding: 0.6rem 0.5rem; margin: 0;
  opacity: 0; visibility: hidden; pointer-events: none;
  transition: opacity var(--dur) var(--ease), visibility var(--dur), transform var(--dur) var(--ease);
  z-index: 210;
}
.nav-item-dropdown:hover .nav-dropdown-menu,
.nav-item-dropdown:focus-within .nav-dropdown-menu,
.nav-item-dropdown.open .nav-dropdown-menu {
  opacity: 1; visibility: visible; pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dropdown-eyebrow {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-lite);
  padding: 0.5rem 0.7rem 0.65rem; margin-block-end: 0.15rem;
  border-block-end: 1px solid rgba(255,255,255,0.08);
}
.nav-dropdown-menu li + li { margin-block-start: 0.15rem; }
.nav-dropdown-item {
  display: flex; align-items: center; gap: 0.8rem;
  padding: 0.55rem 0.7rem; border-radius: calc(var(--radius) - 2px);
  text-align: left; transition: background var(--dur), transform var(--dur);
}
.nav-dropdown-item:hover, .nav-dropdown-item:focus-visible {
  background: rgba(255,255,255,0.06); transform: translateX(2px);
}
.nav-dropdown-badge {
  flex-shrink: 0; width: 38px; height: 38px; border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.07);
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500;
  letter-spacing: 0.04em; color: rgba(255,255,255,0.55);
  transition: background var(--dur), color var(--dur);
}
.nav-dropdown-item:hover .nav-dropdown-badge { background: var(--emerald-lite); color: var(--emerald-on-dark); }
.nav-dropdown-badge svg { width: 15px; height: 15px; }
.nav-dropdown-copy { display: flex; flex-direction: column; align-items: flex-start; gap: 0.12rem; min-width: 0; width: 100%; }
.nav-dropdown-name {
  font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
  color: rgba(255,255,255,0.9); line-height: 1.25; white-space: nowrap;
  transition: color var(--dur);
}
.nav-dropdown-item:hover .nav-dropdown-name { color: var(--white); }
.nav-dropdown-desc {
  font-size: 0.72rem; color: rgba(255,255,255,0.4); line-height: 1.3; white-space: nowrap;
}
.nav-dropdown-item[aria-current="page"] .nav-dropdown-name { color: var(--emerald-on-dark); }
.nav-dropdown-item[aria-current="page"] .nav-dropdown-badge { background: var(--emerald-lite); color: var(--emerald-on-dark); }
.nav-dropdown-divider { height: 1px; background: rgba(255,255,255,0.08); margin: 0.4rem 0.7rem; }
.nav-dropdown-item--all .nav-dropdown-name { font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.72); }
.nav-dropdown-item--all:hover .nav-dropdown-name { color: var(--white); }
.nav-dropdown-arrow { width: 12px; height: 12px; flex-shrink: 0; margin-inline-start: auto; color: rgba(255,255,255,0.3); transition: transform var(--dur), color var(--dur); }
.nav-dropdown-item--all:hover .nav-dropdown-arrow { transform: translateX(3px); color: var(--emerald-on-dark); }
.wrap{max-width:72rem;margin:0 auto;padding:0 1.25rem}
.wrap-narrow{max-width:44rem;margin:0 auto;padding:0 1.25rem}
.container{max-width:var(--max-w);margin-inline:auto;padding-inline:clamp(1.25rem, 4vw, 2.5rem)}
.blog-hero{padding:3rem 0 2rem;text-align:center}
.blog-hero h1{font-size:2.5rem;margin:0 0 .5rem}
.blog-hero p{color:var(--muted-foreground);max-width:38rem;margin:0 auto}
.post-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(280px,1fr));gap:1.75rem;padding:1rem 0 4rem}
.post-card{border:1px solid var(--border);border-radius:var(--radius);overflow:hidden;background:#fff;transition:box-shadow .15s,transform .15s;text-decoration:none;color:inherit;display:flex;flex-direction:column}
.post-card:hover{box-shadow:0 10px 30px rgba(0,0,0,.08);transform:translateY(-2px)}
.post-card img{width:100%;aspect-ratio:16/9;object-fit:cover;background:var(--muted)}
.post-card .body{padding:1.1rem 1.25rem 1.4rem}
.post-card h3{font-size:1.15rem;margin:0 0 .4rem}
.post-card p{color:var(--muted-foreground);font-size:.92rem;margin:0}
.post-meta{font-size:.8rem;color:var(--muted-foreground);margin-top:.7rem}
.empty-state{padding:4rem 1rem;text-align:center;color:var(--muted-foreground)}
article.post{padding:2.5rem 0 5rem}
article.post h1{font-size:2.25rem;margin-bottom:.5rem}
article.post .post-meta{margin-bottom:2rem;padding-bottom:1.5rem;border-bottom:1px solid var(--border)}
article.post .featured{width:100%;border-radius:var(--radius);margin-bottom:2rem;aspect-ratio:16/9;object-fit:cover}
article.post .content{font-size:1.06rem}
article.post .content img{max-width:100%;height:auto;border-radius:.5rem;margin:1.25rem 0}
article.post .content h2{margin-top:2rem}
article.post .content h3{margin-top:1.5rem}
article.post .content a{text-decoration:underline}
article.post .content blockquote{border-left:3px solid var(--coral);margin:1.5rem 0;padding:.25rem 0 .25rem 1.25rem;color:var(--muted-foreground);font-style:italic}
article.post .content pre{background:var(--muted);padding:1rem;border-radius:.5rem;overflow:auto}
article.post .content ul,article.post .content ol{padding-left:1.5rem}

/* forms / app UI (login, editor, admin) */
.card{background:#fff;border:1px solid var(--border);border-radius:var(--radius);padding:2rem;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.form-group{margin-bottom:1.1rem}
.form-group label{display:block;font-size:.85rem;font-weight:600;margin-bottom:.35rem}
.form-group input[type=text],.form-group input[type=email],.form-group input[type=password],.form-group input[type=url],.form-group textarea,.form-group select{
  width:100%;padding:.65rem .85rem;border:1px solid var(--border);border-radius:.5rem;font:inherit;font-size:.95rem;background:#fff;color:var(--ink)
}
.form-group input:focus,.form-group textarea:focus,.form-group select:focus{outline:none;border-color:var(--teal);box-shadow:0 0 0 3px color-mix(in oklab, var(--teal) 20%, transparent)}

/* ---- PDF alt-text review step (insights/admin/review.php, resources/admin/review.php) ---- */
.alt-review-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:1.25rem;margin-bottom:1rem}
.alt-review-item{border:1px solid var(--border);border-radius:.5rem;padding:.75rem;background:var(--cream, #faf8f4)}
.alt-review-item img{display:block;width:100%;max-height:180px;object-fit:contain;background:#fff;border:1px solid var(--border);border-radius:.35rem;margin-bottom:.6rem}
.alt-review-item .form-group{margin-bottom:0}

/* ---- Hyperlinks checklist + "You might also like to read" editor
   (insights/admin/review.php, resources/admin/review.php) ---- */
.link-review-item{display:flex;gap:.55rem;align-items:flex-start;font-size:.88rem;padding:.4rem 0}
.link-review-item input{margin-top:.2rem}
.link-review-item span{word-break:break-all}
.related-links-editor{display:flex;flex-direction:column;gap:.6rem;margin-bottom:1rem}
.related-links-row{display:flex;gap:.6rem;align-items:center}
.related-links-row input[type=text]{flex:1 1 35%}
.related-links-row input[type=url]{flex:2 1 55%}
.related-links-remove{flex:0 0 auto;padding:.5rem .8rem}

/* ---- "You might also like to read" (published insights posts/resources) ---- */
.related-links{border-top:1px solid var(--border);margin-top:2rem;padding-top:1.75rem}
.related-links h2{font-size:1.3rem;margin:0 0 1rem}
.related-links ul{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:.6rem}
.related-links li a{font-weight:600;text-decoration:underline}

/* ---- "What is this insight?" source-type picker (write/editor.php) ---- */
.source-type-picker{display:flex;flex-direction:column;gap:.6rem}
.source-type-option{display:flex;gap:.55rem;align-items:flex-start;font-size:.88rem;font-weight:400;border:1px solid var(--border);border-radius:.5rem;padding:.65rem .85rem;cursor:pointer;background:#fff}
.source-type-option input{margin-top:.2rem}
.source-type-option:has(input:checked){border-color:var(--teal);background:color-mix(in oklab, var(--teal) 6%, transparent)}
.btn{display:inline-flex;align-items:center;gap:.4rem;padding:.7rem 1.6rem;border-radius:999px;font-size:.8rem;font-weight:600;text-transform:uppercase;letter-spacing:.05em;cursor:pointer;border:2px solid transparent;text-decoration:none;font-family:var(--font-sans);background:var(--teal-deep);color:#fff;box-shadow:0 4px 20px rgba(26,107,69,0.28);transition:all .3s cubic-bezier(0.4,0,0.2,1)}
.btn:hover{transform:translateY(-2px);box-shadow:0 8px 32px rgba(26,107,69,0.38);background:var(--teal)}
.btn-outline{background:transparent;border-color:var(--border);color:var(--ink)}
.btn-outline:hover{background:var(--muted)}
.btn-danger{background:var(--destructive);color:#fff}
.btn-danger:hover{opacity:.9}
.btn-sm{padding:.4rem .9rem;font-size:.8rem}
/* The "Download as a PDF" button on a manual (no original file) post or
   resource, while /assets/pdf-export.js is generating one client-side --
   see .js-download-as-pdf there. */
.btn.pdf-export-busy{opacity:.65;cursor:wait;transform:none!important}
.alert{padding:.85rem 1rem;border-radius:.5rem;font-size:.9rem;margin-bottom:1.25rem}
.alert-error{background:#fef2f2;color:#991b1b;border:1px solid #fecaca}
.alert-success{background:#f0fdf4;color:#166534;border:1px solid #bbf7d0}
.badge{display:inline-block;padding:.2rem .65rem;border-radius:999px;font-size:.72rem;font-weight:600;text-transform:uppercase;letter-spacing:.03em}
.badge-draft{background:var(--muted);color:var(--muted-foreground)}
.badge-pending{background:#fef9c3;color:#854d0e}
.badge-approved,.badge-published{background:#dcfce7;color:#166534}
.badge-rejected{background:#fee2e2;color:#991b1b}
table.admin-table{width:100%;border-collapse:collapse;font-size:.9rem}
table.admin-table th{text-align:left;font-size:.75rem;text-transform:uppercase;letter-spacing:.04em;color:var(--muted-foreground);border-bottom:1px solid var(--border);padding:.6rem .5rem}
table.admin-table td{padding:.85rem .5rem;border-bottom:1px solid var(--border);vertical-align:middle}
.app-shell{min-height:100vh;background:var(--cream)}
.app-header{background:rgba(12,21,33,.96);backdrop-filter:blur(16px) saturate(1.4);color:#fff;border-bottom:1px solid rgba(255,255,255,.06)}
.app-header .wrap{display:flex;align-items:center;justify-content:space-between;padding:.9rem 1.25rem}
.app-header a{color:#fff}
.app-header .blog-nav a{color:rgba(255,255,255,.85)}
.app-header .blog-nav a:hover{color:#fff}
.app-main{padding:2.5rem 0}
.two-col{display:grid;grid-template-columns:1fr 300px;gap:2rem;align-items:start}
@media (max-width:800px){.two-col{grid-template-columns:1fr}}
.editor-toolbar-note{font-size:.8rem;color:var(--muted-foreground);margin-top:.4rem}
.section-title{font-size:1.5rem;margin:0 0 1.25rem}
.muted{color:var(--muted-foreground)}
.stack{display:flex;flex-direction:column;gap:.6rem}
.row{display:flex;gap:.6rem;align-items:center}
.space-between{display:flex;justify-content:space-between;align-items:center}
/* ============================================================ FOOTER
   (copied verbatim from /site.css so Insights/Resources match the main
   landing page's footer exactly, per site-wide request.)
   site.css has a page-wide `* { margin:0; padding:0 }` reset that this
   stylesheet doesn't (blog/app content here relies on default browser
   spacing for paragraphs, lists, etc.), so the footer's own <ul>/<li>/<p>
   elements would otherwise keep their default browser margins (a <ul>'s
   ~1em top margin and ~40px left padding, an unreset <p>'s top margin
   stacking with the explicit bottom margin below) -- that's what was
   throwing off column alignment and adding extra gaps around the
   legal-panel triggers. Reset only the specific elements that carry a
   default browser margin/padding (not *, which would also strip the
   .container rule's own margin/padding-inline below and re-break the
   centering/side-padding of the whole footer). */
/* Floating "go to homepage" button -- present on every Resources/Insights
   page (public and logged-in alike), including generated static resource
   posts. Copied verbatim from the main site's .site-home-btn (site.css)
   so it looks and sits identically everywhere; here it's a plain link
   (no scroll-to-top case -- these pages are never "home") so it needs no
   JS of its own. See public_footer.php / app_footer.php for the markup. */
.site-home-btn {
  /* 31.5px, not a round 28/30px: at the page's natural resting scroll
     position (all the way down), this centers the button vertically
     between .footer-bottom's top border and the next line below it (the
     first .legal-panel's top border) -- see site.css's matching comment,
     which this mirrors exactly since both stylesheets share the same
     footer structure/padding. */
  position: fixed; left: 24px; bottom: 31.5px; z-index: 60;
  width: 46px; height: 46px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: rgba(21,34,54,0.55);
  border: 1px solid rgba(255,255,255,0.25);
  backdrop-filter: blur(6px);
  color: #fff; cursor: pointer;
  opacity: 0.6; transition: opacity var(--dur), background var(--dur);
}
.site-home-btn:hover { opacity: 1; background: rgba(21,34,54,0.85); }
.site-home-btn svg { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; }
/* Same clearance as site.css: the cookie banner sits at the same corner as
   this button with a higher z-index, so it would otherwise hide it for
   every first-time visitor -- --cookie-banner-h is set from JS
   (initCookieBanner() in public_footer.php) to the banner's own actual
   rendered height, which varies a lot by viewport width. */
body.has-cookie-banner .site-home-btn { bottom: calc(31.5px + var(--cookie-banner-h, 72.5px)); }

/* Cookie consent banner -- same markup/behaviour as the main site's
   (site.css), styled with this module's own tokens/button classes. */
.cookie-banner {
  position: fixed; inset-inline: 0; inset-block-end: 0; z-index: 300;
  background: var(--navy); border-top: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 -8px 32px rgba(0,0,0,0.3);
  transform: translateY(110%); transition: transform 0.4s var(--ease);
}
.cookie-banner.show { transform: translateY(0); }
.cookie-banner-inner {
  max-width: var(--max-w); margin-inline: auto;
  padding: 1.2rem clamp(1.25rem, 4vw, 2.5rem);
  display: flex; align-items: center; justify-content: space-between;
  gap: 1.5rem; flex-wrap: wrap;
}
.cookie-text { font-size: 0.82rem; line-height: 1.55; color: rgba(246,242,235,0.7); max-width: 640px; }
.cookie-link {
  background: none; border: none; padding: 0; margin: 0; cursor: pointer;
  font: inherit; color: var(--emerald-glow); text-decoration: underline;
}
.cookie-actions { display: flex; gap: 0.7rem; flex-shrink: 0; }
/* Decline reuses .btn-outline, styled elsewhere in this module for white/
   light card backgrounds (dark ink text). On this banner's dark navy
   background that would render as near-black-on-navy -- effectively
   invisible -- so it's overridden here to use light text/border instead. */
.cookie-banner .btn-outline {
  color: rgba(255,255,255,0.8); border-color: rgba(255,255,255,0.3);
}
.cookie-banner .btn-outline:hover {
  background: rgba(255,255,255,0.1); color: #fff; border-color: rgba(255,255,255,0.5);
}

.footer ul, .footer ol, .footer li, .footer p, .footer h1, .footer h2, .footer h3, .footer h4 { margin: 0; padding: 0; }
.footer { background: #080E18; padding-block: 3rem 1.6rem; }
.footer-cols { display: flex; gap: 2.4rem; border: none; }
.footer-cols > .footer-col { flex: 1 1 0; min-width: 0; border: none; }
.footer-brand { display: flex; align-items: flex-start; }
.footer-logo-img { height: 40px; width: auto; display: block; }
.footer-col-title { font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(246,242,235,0.35); margin-block-end: 1rem; }
.footer-menu { display: flex; flex-direction: column; gap: 0.6rem; list-style: none; border: none; }
.footer-menu a { font-size: 0.83rem; color: rgba(246,242,235,0.55); transition: color var(--dur); }
.footer-menu a:hover { color: rgba(246,242,235,0.9); }

/* --- Footer Platforms/Insights flyout (opens right on desktop, expands
   inline on mobile) -- copied verbatim from site.css's own copy of this
   block (the badge+name+description "mega-menu"-lite treatment, matching
   .nav-dropdown-* in the top nav above) so this footer (Insights/Resources/
   Clients all share this stylesheet) behaves identically to the main
   site's. Superseded a plain-link version of this block that predated that
   redesign -- see .nav-dropdown-item above for the equivalent top-nav
   history/rationale comments. --- */
.footer-menu li.footer-item-flyout { align-self: flex-start; position: relative; }
.footer-flyout-head { display: flex; align-items: center; gap: 0.25rem; }
.footer-flyout-head a { font-size: 0.83rem; color: rgba(246,242,235,0.55); transition: color var(--dur); }
.footer-flyout-head a:hover { color: rgba(246,242,235,0.9); }
.footer-flyout-toggle {
  background: none; border: none; padding: 0.15rem; margin: 0; cursor: pointer; flex-shrink: 0;
  color: rgba(246,242,235,0.4); display: flex; align-items: center; justify-content: center;
  transition: color var(--dur);
}
.footer-flyout-toggle:hover, .footer-flyout-toggle[aria-expanded="true"] { color: rgba(246,242,235,0.85); }
.footer-flyout-toggle svg { width: 9px; height: 9px; transform: rotate(-90deg); transition: transform var(--dur) var(--ease); }
.footer-item-flyout:hover .footer-flyout-toggle svg,
.footer-item-flyout:focus-within .footer-flyout-toggle svg,
.footer-item-flyout.open .footer-flyout-toggle svg { transform: rotate(90deg); }
.footer-flyout-menu { list-style: none; max-height: 0; overflow: hidden; transition: max-height 0.32s var(--ease); }
.footer-item-flyout.open .footer-flyout-menu { max-height: 260px; margin-block-start: 0.5rem; }
.footer-flyout-menu li + li { margin-block-start: 0.5rem; }
.footer-flyout-menu a {
  display: block; padding-inline-start: 0.9rem; font-size: 0.79rem;
  color: rgba(246,242,235,0.45); border-inline-start: 2px solid rgba(246,242,235,0.14);
}
.footer-flyout-menu a:hover { color: rgba(246,242,235,0.85); border-inline-start-color: var(--emerald-glow); }
.footer-flyout-menu a[aria-current="page"] { color: var(--emerald-on-dark); border-inline-start-color: var(--emerald-glow); }
/* Badge/description/eyebrow/divider/arrow are the desktop flyout's richer
   treatment (see the ≥721px block below) -- hidden here so the mobile
   accordion keeps showing a plain name per row. .footer-flyout-copy
   unwraps to a plain inline child so hiding .footer-flyout-desc leaves
   just the name as the anchor's own text, matching the old markup. */
.footer-flyout-badge, .footer-flyout-desc, .footer-flyout-eyebrow, .footer-flyout-divider, .footer-flyout-arrow { display: none; }
.footer-flyout-copy { display: contents; }
/* Footer columns are still a row above 720px (see .footer-cols media rule
   below) — fly the menu out to the right of "Platforms"/"Insights" instead
   of stacking it below. */
@media (min-width: 721px) {
  /* Anchored to the BOTTOM of the trigger, growing upward -- with 5-7 badge
     rows this menu runs 350-500px tall, and the footer sits at the very
     bottom of the page with nothing below it to grow into, so opening
     downward would push most of it below the fold, out of reach of a
     hover-only menu. ".footer .footer-flyout-menu", not just
     ".footer-flyout-menu": the ".footer ul, .footer li, ..." reset above
     (one class + one type selector, see its own comment) otherwise
     outweighs a plain ".footer-flyout-menu" (one class) and zeroes this
     padding right back out, since .footer-flyout-menu IS a <ul> -- same fix
     as ".footer .footer-links" below. */
  .footer .footer-flyout-menu {
    position: absolute; left: 100%; bottom: -0.7rem;
    transform: translateX(-6px);
    width: 322px; max-height: none; overflow: visible;
    background: linear-gradient(165deg, var(--navy) 0%, var(--navy-mid) 100%);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
    padding: 0.6rem 0.5rem; margin: 0 !important;
    opacity: 0; visibility: hidden; pointer-events: none;
    transition: opacity var(--dur) var(--ease), visibility var(--dur), transform var(--dur) var(--ease);
    z-index: 50;
  }
  .footer-item-flyout:hover .footer-flyout-menu,
  .footer-item-flyout:focus-within .footer-flyout-menu,
  .footer-item-flyout.open .footer-flyout-menu {
    opacity: 1; visibility: visible; pointer-events: auto;
    transform: translateX(0);
    /* .footer-item-flyout.open .footer-flyout-menu (the mobile accordion's
       260px cap, set outside this media query) is just as specific as this
       selector, so without repeating max-height here it would win the tie
       and clamp this much taller desktop menu to 260px. */
    max-height: none;
  }
  .footer-flyout-menu li + li { margin-block-start: 0.15rem; }
  .footer-flyout-eyebrow {
    display: block;
    font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500;
    letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold-lite);
    padding: 0.5rem 0.7rem 0.65rem; margin-block-end: 0.15rem;
    border-block-end: 1px solid rgba(255,255,255,0.08);
  }
  /* Extra ".footer-flyout-menu" ancestor prefix on these two rules isn't
     decorative -- it's needed to outrank the pre-existing ".footer-flyout-menu
     a" / "a:hover" rules above (which include the "a" type selector, making
     them MORE specific than a bare ".footer-flyout-item" class would be,
     regardless of source order), so display:flex/hover background actually
     take effect instead of silently losing to the mobile anchor styles. */
  .footer-flyout-menu .footer-flyout-item {
    display: flex; align-items: center; gap: 0.8rem;
    padding: 0.55rem 0.7rem; border-radius: calc(var(--radius) - 2px);
    border-inline-start: none; padding-inline-start: 0.7rem;
    text-align: left; white-space: normal;
    transition: background var(--dur), transform var(--dur);
  }
  .footer-flyout-menu .footer-flyout-item:hover, .footer-flyout-menu .footer-flyout-item:focus-visible {
    background: rgba(255,255,255,0.06); transform: translateX(2px);
  }
  .footer-flyout-badge {
    display: flex; flex-shrink: 0; width: 38px; height: 38px; border-radius: 8px;
    align-items: center; justify-content: center;
    background: rgba(255,255,255,0.07);
    font-family: var(--font-mono); font-size: 0.62rem; font-weight: 500;
    letter-spacing: 0.04em; color: rgba(255,255,255,0.55);
    transition: background var(--dur), color var(--dur);
  }
  .footer-flyout-badge svg { width: 15px; height: 15px; }
  .footer-flyout-item:hover .footer-flyout-badge { background: var(--emerald-lite); color: var(--emerald-on-dark); }
  .footer-flyout-copy { display: flex; flex-direction: column; gap: 0.12rem; min-width: 0; }
  .footer-flyout-name {
    font-family: var(--font-display); font-size: 0.9rem; font-weight: 600;
    color: rgba(255,255,255,0.9); line-height: 1.25; white-space: nowrap;
    transition: color var(--dur);
  }
  .footer-flyout-item:hover .footer-flyout-name { color: var(--white); }
  .footer-flyout-desc {
    display: block; font-size: 0.72rem; color: rgba(255,255,255,0.4); line-height: 1.3; white-space: nowrap;
  }
  .footer-flyout-item[aria-current="page"] .footer-flyout-name { color: var(--emerald-on-dark); }
  .footer-flyout-item[aria-current="page"] .footer-flyout-badge { background: var(--emerald-lite); color: var(--emerald-on-dark); }
  .footer-flyout-divider { display: block; height: 1px; background: rgba(255,255,255,0.08); margin: 0.4rem 0.7rem; }
  .footer-flyout-item--all .footer-flyout-name { font-size: 0.82rem; font-weight: 500; color: rgba(255,255,255,0.72); }
  .footer-flyout-item--all:hover .footer-flyout-name { color: var(--white); }
  .footer-flyout-arrow {
    display: block; width: 12px; height: 12px; flex-shrink: 0; margin-inline-start: auto;
    color: rgba(255,255,255,0.3); transition: transform var(--dur), color var(--dur);
  }
  .footer-flyout-item--all:hover .footer-flyout-arrow { transform: translateX(3px); color: var(--emerald-on-dark); }
}
.footer-info p { font-size: 0.83rem; color: rgba(246,242,235,0.55); margin: 0 0 0.6rem; }
.footer-info p:last-child { margin-block-end: 0; }
.footer-info p strong { color: rgba(246,242,235,0.85); font-weight: 600; }
.footer-info a { color: rgba(246,242,235,0.55); transition: color var(--dur); }
.footer-info a:hover { color: rgba(246,242,235,0.9); }
/* padding-block (not padding-block-start) so the footer links/social icons
   sit centered top-to-bottom between this rule's own top border and the
   next element's top border directly below (the first .legal-panel, flush
   against this element and showing its own 1px border even collapsed).
   0.8rem top+bottom (not the original 1.6rem top-only) keeps the total
   distance between the two lines the same as before this was made
   symmetric -- see the matching comment in site.css's .footer-bottom. */
.footer-bottom { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin-block-start: 2.4rem; padding-block: 0.8rem; border-block-start: 1px solid rgba(246,242,235,0.08); }
.footer-links { display: flex; gap: 1.6rem; list-style: none; flex-wrap: wrap; border: none; }
.footer-links a { font-size: 0.76rem; color: rgba(246,242,235,0.28); transition: color var(--dur); }
.footer-links a:hover { color: rgba(246,242,235,0.65); }
.footer-social { display: flex; gap: 1rem; }
/* The LinkedIn/Facebook marks are now full-color vector logos (their own
   official badge colors baked into the SVG -- see /assets/logo/), not
   currentColor line icons, so there's no color rule to apply here anymore;
   only the same dim/brighten-on-hover treatment as before. */
.footer-social a { opacity: 0.82; transition: opacity var(--dur); display: flex; }
.footer-social a:hover { opacity: 1; }
.footer-social img { width: 19px; height: 19px; display: block; }
/* Same font, size and color as the top nav's own links (.blog-nav a) so
   "Privacy Policy"/"Terms" read as part of the same site typography. */
.footer-legal-trigger { background: none; border: none; padding: 0; margin: 0; cursor: pointer; font-family: var(--font-sans); font-size: 0.9rem; font-weight: 500; color: rgba(255,255,255,0.68); transition: color var(--dur); }
.footer-legal-trigger:hover, .footer-legal-trigger[aria-expanded="true"] { color: #fff; }
@media (max-width: 720px) { .footer-cols { flex-direction: column; gap: 2rem; } }
/* .site-home-btn floats at a fixed pixel offset from the viewport's left
   edge (see above), not from .footer-bottom's own container, so as the
   viewport narrows and .container's side inset shrinks toward its floor,
   the Privacy Policy/Terms links end up underneath it -- see the matching,
   more detailed comment in site.css for the exact math this mirrors. */
/* ".footer .footer-links", not just ".footer-links": the earlier
   ".footer ul, .footer li, ..." reset above (one class + one type
   selector) otherwise outweighs a plain ".footer-links" (one class) and
   silently wins the margin-inline-start back to 0. */
@media (max-width: 1300px) { .footer .footer-links { margin-inline-start: 60px; } }
/* Expandable legal panels */
.legal-panel { max-height: 0; overflow: hidden; transition: max-height 0.4s var(--ease); border-top: 1px solid rgba(255,255,255,0.06); }
.legal-panel.open { max-height: 1400px; border-top-color: rgba(255,255,255,0.1); }
.legal-panel-inner { padding-block: 2rem 1.4rem; max-width: 760px; }
.legal-panel-inner h4 { font-family: var(--font-display); font-size: 1.2rem; font-weight: 500; color: var(--parchment); margin-block-end: 0.9rem; }
.legal-panel-inner p { font-size: 0.82rem; line-height: 1.7; color: rgba(246,242,235,0.55); margin-block-end: 0.9rem; }
.legal-panel-inner a { color: var(--emerald-glow); text-decoration: underline; }

/* ============================================================ RESPONSIVE (blog + admin header)
   The header nav (public "Main site / Insights / Author login" and the
   logged-in "Write / Admin / Log out" bar) is a plain flex row with no
   wrap, so on narrow phones it was overflowing instead of dropping to a
   second line. Wrapping is enough here — these are short link lists,
   not the full site nav, so a hamburger menu would be overkill. */
@media (max-width: 640px) {
  .blog-header-inner,
  .app-header .wrap {
    flex-wrap: wrap;
    row-gap: 0.6rem;
  }
  .blog-nav {
    flex-wrap: wrap;
    row-gap: 0.5rem;
    width: 100%;
  }
  /* The "Insights" dropdown's 322px popup, centered under its trigger via
     left:50%/translateX(-50%), would run off the left edge of a phone-width
     viewport (.blog-nav has no hamburger-menu fallback to switch to
     instead, unlike the main site's nav -- see the file header above) --
     pin it to the nav's own left edge and cap its width to the viewport
     instead of the trigger's position. */
  .nav-dropdown-menu {
    left: 0; transform: translate(0, -6px);
    width: min(322px, calc(100vw - 2.5rem));
  }
  .nav-item-dropdown:hover .nav-dropdown-menu,
  .nav-item-dropdown:focus-within .nav-dropdown-menu,
  .nav-item-dropdown.open .nav-dropdown-menu {
    transform: translate(0, 0);
  }
}
/* .site-home-btn floats at a constant screen position (left:24px,
   bottom:31.5px) on every article/listing page regardless of scroll, which
   only clears real content on wide viewports -- on phones and tablets it
   ends up sitting on top of article text, PDF/case-study previews or card
   content depending on scroll position. .blog-header is position:sticky
   (see above), so the "Main site" link it carries stays reachable at every
   scroll position without this floating duplicate -- but rather than hide
   this one too, it's shrunk and tucked into the corner with a low idle
   opacity (matching the same treatment in site.css), so it stays available
   without competing with the content it can overlap. */
@media (max-width: 1024px) {
  .site-home-btn {
    width: 38px; height: 38px;
    left: 12px; bottom: 12px;
    opacity: 0.4;
  }
  .site-home-btn svg { width: 16px; height: 16px; }
  .site-home-btn:active { opacity: 1; background: rgba(21,34,54,0.85); }
  /* Same clearance logic as the rule above, just measured from this
     breakpoint's own smaller base offset (12px, not 31.5px). */
  body.has-cookie-banner .site-home-btn { bottom: calc(12px + var(--cookie-banner-h, 72.5px)); }
}
@media (max-width: 400px) {
  .blog-nav { font-size: 0.82rem; gap: 0.55rem 0.85rem; }
}

/* ---- MedSync wordmark on the dark header/footer ---- */
.blog-logo-badge{position:relative;display:grid;place-items:center;width:40px;height:40px;border-radius:12px;background:#f6f0e6}
.blog-logo-mark{font-family:'Playfair Display',Georgia,serif;font-size:1.3rem;font-weight:500;color:#12182b;line-height:1}
.blog-logo-dot{position:absolute;right:6px;bottom:6px;width:6px;height:6px;border-radius:50%;background:#f0653f}
.blog-logo-text{display:flex;flex-direction:column;line-height:1.1}
.blog-logo-name{font-family:'Playfair Display',Georgia,serif;font-size:1.1rem;font-weight:500;color:#fff}
.blog-logo-sub{font-size:.62rem;font-weight:600;letter-spacing:.18em;color:rgba(255,255,255,.7)}
.footer-brand .blog-logo{display:inline-flex}

/* MedSync: service names are longer than platform names -- widen the dropdown and anchor it to the nav's right edge so it never runs off-screen. */
@media (min-width: 641px) {
  .nav-dropdown-menu { left: auto; right: -0.5rem; width: 380px; transform: translate(0, -6px); }
  .nav-item-dropdown:hover .nav-dropdown-menu,
  .nav-item-dropdown:focus-within .nav-dropdown-menu,
  .nav-item-dropdown.open .nav-dropdown-menu { transform: translate(0, 0); }
}
.blog-logo-text{gap:3px}
.blog-logo-sub{line-height:1}
