/*
Theme Name: iMDR MedTech
Theme URI: https://imdrmedtech.com
Author: iMDR MedTech
Author URI: https://imdrmedtech.com
Description: A clean, modern WordPress theme for iMDR MedTech — a specialised marketplace where medical device work is posted and the right vetted experts get it. Ships with the platform home page plus guide, expertise-area, trust and resource pages pre-built on activation.
Version: 2.10.4
Requires at least: 6.0
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: imdr-medtech
Tags: custom-menu, featured-images, responsive-layout, translation-ready
*/

/* ==========================================================================
   0. Design tokens
   ========================================================================== */
/* Self-hosted Inter (Latin subset): no request to Google Fonts. */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400; font-display: swap; src: url('assets/fonts/inter-400.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 500; font-display: swap; src: url('assets/fonts/inter-500.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 600; font-display: swap; src: url('assets/fonts/inter-600.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 700; font-display: swap; src: url('assets/fonts/inter-700.woff') format('woff'); }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 800; font-display: swap; src: url('assets/fonts/inter-800.woff') format('woff'); }

:root {
  --navy-950: #081225;
  --navy-900: #0b2545;
  --navy-800: #112f5c;
  --navy-700: #163a72;
  --navy-100: #e7edf6;
  --teal-600: #0e8c86;
  --teal-500: #14b8a6;
  --teal-400: #5fd3c4;
  --amber-500: #f5a524;
  --amber-600: #e08e0b;
  --ink-900: #111827;
  --ink-700: #374151;
  --ink-500: #6b7280;
  --ink-300: #d1d5db;
  --surface-0: #ffffff;
  --surface-50: #f7f9fc;
  --surface-100: #eef2f8;
  --border: #e3e8f0;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --shadow-sm: 0 1px 2px rgba(11, 37, 69, 0.06);
  --shadow-md: 0 8px 24px rgba(11, 37, 69, 0.08);
  --shadow-lg: 0 18px 48px rgba(11, 37, 69, 0.14);
  --maxw: 1180px;
  --font-head: 'Plus Jakarta Sans', 'Inter', 'Segoe UI', Arial, sans-serif;
  --font-body: 'Inter', 'Segoe UI', Arial, sans-serif;
}

/* ==========================================================================
   1. Reset & base
   ========================================================================== */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink-700);
  background: var(--surface-0);
  font-size: 16px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--teal-600); text-decoration: none; }
a:hover { color: var(--navy-800); }
ul { padding-left: 1.2em; }
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--navy-900);
  line-height: 1.2;
  margin: 0 0 0.5em;
  font-weight: 700;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.1rem, 4vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.25rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; }
.container {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}
section { padding: 72px 0; }
.section-tight { padding: 48px 0; }
.text-center { text-align: center; }
.eyebrow {
  display: inline-block;
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--teal-600);
  background: rgba(20, 184, 166, 0.1);
  padding: 6px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.lede {
  font-size: 1.15rem;
  color: var(--ink-700);
  max-width: 760px;
}
.center-col { margin-left: auto; margin-right: auto; }

/* ==========================================================================
   2. Buttons
   ========================================================================== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.98rem;
  padding: 13px 26px;
  border-radius: 999px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease, color 0.15s ease;
  line-height: 1;
}
.btn-primary {
  background: var(--teal-500);
  color: var(--navy-950);
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover { background: var(--teal-600); color: #fff; transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent;
  border-color: rgba(255,255,255,0.5);
  color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); color: #fff; border-color: #fff; }
.btn-dark {
  background: var(--navy-900);
  color: #fff;
}
.btn-dark:hover { background: var(--navy-800); color: #fff; transform: translateY(-2px); }
.btn-amber { background: var(--amber-500); color: var(--navy-950); }
.btn-amber:hover { background: var(--amber-600); color: #fff; }
.btn-block { width: 100%; justify-content: center; }

/* ==========================================================================
   3. Header
   ========================================================================== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 999;
  background: rgba(255,255,255,0.92);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 24px;
  max-width: var(--maxw);
  margin: 0 auto;
}
.site-branding { display: flex; align-items: center; gap: 10px; }
.site-branding a { display: flex; align-items: center; gap: 10px; color: inherit; }
.brand-mark {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--navy-900), var(--teal-600));
  display: flex; align-items: center; justify-content: center;
  color: #fff; font-family: var(--font-head); font-weight: 800; font-size: 1.1rem;
  flex-shrink: 0;
}
.site-title {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--navy-900);
  margin: 0;
  line-height: 1.1;
}
.site-tagline { font-size: 0.72rem; color: var(--ink-500); letter-spacing: 0.03em; }

.primary-nav ul {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0; padding: 0;
}
.primary-nav li { position: relative; }
.primary-nav a {
  display: block;
  color: var(--navy-900);
  font-weight: 600;
  font-size: 0.92rem;
  padding: 10px 14px;
  border-radius: 8px;
}
.primary-nav a:hover { background: var(--surface-100); color: var(--teal-600); }
.header-cta { display: flex; align-items: center; gap: 14px; }
.menu-toggle {
  display: none;
  background: none; border: none; cursor: pointer;
  width: 42px; height: 42px; border-radius: 8px;
  align-items: center; justify-content: center;
}
.menu-toggle span, .menu-toggle::before, .menu-toggle::after { display: none; }
.menu-toggle svg { width: 24px; height: 24px; color: var(--navy-900); }

@media (max-width: 1379px) {
  .primary-nav {
    position: fixed; top: 70px; left: 0; right: 0; bottom: auto;   /* height follows the content, not the screen */
    max-height: calc(100vh - 70px); max-height: calc(100dvh - 70px);
    background: #fff;
    box-shadow: 0 18px 30px -12px rgba(11, 37, 69, 0.22);
    transform: translateY(-110%);
    visibility: hidden;                      /* closed menu must not catch clicks or tab focus */
    transition: transform 0.25s ease, visibility 0s linear 0.25s;
    overflow-y: auto;
    padding: 10px 0 40px;
    border-top: 1px solid var(--border);
  }
  .primary-nav.is-open { transform: translateY(0); visibility: visible; transition: transform 0.25s ease, visibility 0s; }
  .primary-nav ul { flex-direction: column; align-items: stretch; padding: 0 20px; gap: 4px; }
  .primary-nav a { padding: 14px 10px; font-size: 1.02rem; border-bottom: 1px solid var(--surface-100); border-radius: 0; }
  .menu-toggle { display: inline-flex; }
  .header-cta .btn-dark-label { display: none; }
}

/* ==========================================================================
   4. Hero
   ========================================================================== */
.hero {
  position: relative;
  background: radial-gradient(1100px 500px at 85% -10%, rgba(20,184,166,0.35), transparent 60%), linear-gradient(160deg, var(--navy-950), var(--navy-800) 60%, var(--navy-700));
  color: #fff;
  overflow: hidden;
  padding: 100px 0 90px;
}
.hero::after {
  content: "";
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.08) 1px, transparent 1px);
  background-size: 22px 22px;
  opacity: 0.3;
  pointer-events: none;
}
.hero-inner { position: relative; z-index: 1; max-width: 760px; }
.hero .eyebrow { background: rgba(20,184,166,0.18); color: var(--teal-400); }
.hero h1 { color: #fff; }
.hero p.lede { color: rgba(255,255,255,0.82); }
.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 28px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
  margin-top: 56px;
  max-width: 640px;
  position: relative; z-index: 1;
}
.hero-stat { border-left: 2px solid rgba(255,255,255,0.25); padding-left: 14px; }
.hero-stat .num { font-family: var(--font-head); font-size: 1.8rem; font-weight: 800; color: var(--teal-400); display: block; }
.hero-stat .label { font-size: 0.82rem; color: rgba(255,255,255,0.7); }

.page-hero {
  background: linear-gradient(160deg, var(--navy-950), var(--navy-800) 70%);
  color: #fff;
  padding: 72px 0 56px;
}
.page-hero h1 { color: #fff; margin-bottom: 14px; }
.page-hero .lede { color: rgba(255,255,255,0.82); }
.breadcrumb { font-size: 0.85rem; color: rgba(255,255,255,0.55); margin-bottom: 18px; }
.breadcrumb a { color: rgba(255,255,255,0.75); }

/* ==========================================================================
   5. Cards & grids
   ========================================================================== */
.section-head { max-width: 680px; margin: 0 auto 48px; text-align: center; }
.grid { display: grid; gap: 26px; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 920px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 640px) {
  .grid-3, .grid-4, .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--surface-0);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 30px 26px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--teal-400); }
.card .icon {
  width: 48px; height: 48px;
  border-radius: 12px;
  background: var(--navy-100);
  color: var(--navy-900);
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 18px;
}
.card .icon svg { width: 24px; height: 24px; }
.card h3 { margin-bottom: 10px; font-size: 1.12rem; }
.card p { color: var(--ink-500); margin-bottom: 0; font-size: 0.95rem; }

.bg-surface { background: var(--surface-50); }
.bg-navy { background: var(--navy-900); color: #fff; }
.bg-navy h2, .bg-navy h3 { color: #fff; }
.bg-navy p { color: rgba(255,255,255,0.78); }

/* checklist */
.check-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.check-list li {
  position: relative;
  padding-left: 34px;
  font-size: 0.98rem; color: var(--ink-700);
}
.check-list li::before {
  content: "";
  position: absolute; left: 0; top: 2px;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--teal-500);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: center;
  background-size: 13px;
}
.bg-navy .check-list li::before { background-color: var(--teal-400); }

/* two-column feature row */
.feature-row {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 50px;
  align-items: center;
}
.feature-row.reverse .feature-media { order: 2; }
@media (max-width: 860px) {
  .feature-row, .feature-row.reverse { grid-template-columns: 1fr; }
  .feature-row.reverse .feature-media { order: 0; }
}
.feature-media {
  background: linear-gradient(160deg, var(--navy-900), var(--teal-600));
  border-radius: var(--radius-lg);
  min-height: 280px;
  display: flex; align-items: center; justify-content: center;
  color: #fff;
  position: relative;
  overflow: hidden;
  padding: 36px;
}
.feature-media .big-icon svg { width: 96px; height: 96px; opacity: 0.9; }

/* accordion-ish definition blocks used for service lists */
.service-block {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 26px 28px;
  margin-bottom: 18px;
  background: #fff;
}
.service-block h3 {
  display: flex; align-items: center; gap: 10px;
  font-size: 1.1rem; margin-bottom: 12px;
}
.service-block h3 .tick {
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--teal-500); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
  flex-shrink: 0; font-size: 0.9rem;
}
.service-block ul { margin: 0; padding-left: 1.1em; color: var(--ink-700); }
.service-block ul li { margin-bottom: 6px; }
.service-block p { color: var(--ink-700); }

/* pricing box */
.pricing-box {
  border: 2px solid var(--teal-500);
  border-radius: var(--radius-lg);
  padding: 40px 34px;
  background: #fff;
  box-shadow: var(--shadow-lg);
  max-width: 480px;
  margin: 0 auto;
  text-align: center;
}
.price-amount { font-family: var(--font-head); font-size: 2.6rem; font-weight: 800; color: var(--navy-900); }
.price-sub { color: var(--ink-500); margin-bottom: 22px; }
.pricing-box .btn { margin-top: 10px; }

/* table-like comparison for jurisdictions */
.region-list { display: grid; gap: 16px; }
.region-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  background: var(--surface-0);
}
.region-item h3, .region-item h4 { margin: 0 0 8px; font-family: var(--font-head); color: var(--navy-900); font-size: 1.02rem; }
.region-item p { margin: 0; color: var(--ink-500); font-size: 0.92rem; }

/* FAQ */
.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.faq-item h3 { font-size: 1.02rem; margin-bottom: 8px; color: var(--navy-900); }
.faq-item p { color: var(--ink-500); margin: 0; }

/* steps */
.steps { counter-reset: step; display: grid; gap: 22px; }
.step { display: flex; gap: 18px; align-items: flex-start; }
.step .num {
  counter-increment: step;
  width: 38px; height: 38px; border-radius: 50%;
  background: var(--navy-900); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-head); font-weight: 700; flex-shrink: 0;
}
.step .num::before { content: counter(step); }
.step h3, .step h4 { margin: 0 0 4px; font-size: 1.02rem; color: var(--navy-900); }
.step p { margin: 0; color: var(--ink-500); font-size: 0.95rem; }

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--navy-950), var(--navy-800));
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 56px 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 30px;
  flex-wrap: wrap;
}
.cta-band h2 { color: #fff; margin-bottom: 8px; }
.cta-band p { color: rgba(255,255,255,0.78); margin: 0; max-width: 480px; }

/* Tags */
.tag-cloud { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.tag-chip {
  background: var(--surface-100);
  color: var(--ink-500);
  font-size: 0.78rem;
  padding: 6px 12px;
  border-radius: 999px;
}

/* content default styles (generic WP content inside pages) */
.entry-content { max-width: 880px; margin: 0 auto; }
.entry-content h2 { margin-top: 1.4em; }
.entry-content h3 { margin-top: 1.1em; }
.entry-content ul { color: var(--ink-700); }

/* ==========================================================================
   6. Footer
   ========================================================================== */
.site-footer {
  background: var(--navy-950);
  color: rgba(255,255,255,0.75);
  padding-top: 64px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1.1fr 1.2fr;
  gap: 40px;
  padding-bottom: 48px;
  border-bottom: 1px solid rgba(255,255,255,0.1);
}
@media (max-width: 820px) {
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  .footer-grid { grid-template-columns: 1fr; }
}
.footer-brand { display: inline-flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.footer-brand .site-title { color: #fff; }
.footer-col h4 {
  color: #fff; font-family: var(--font-head);
  font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.06em;
  margin-bottom: 16px;
}
.footer-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.footer-col a { color: rgba(255,255,255,0.7); font-size: 0.92rem; }
.footer-col a:hover { color: var(--teal-400); }
.footer-note { font-size: 0.9rem; color: rgba(255,255,255,0.65); max-width: 320px; }
.footer-bottom {
  display: flex; align-items: center; justify-content: space-between;
  padding: 24px 0; font-size: 0.82rem; color: rgba(255,255,255,0.5);
  flex-wrap: wrap; gap: 10px;
}
.footer-bottom a { color: rgba(255,255,255,0.6); }

/* Utility */
.mt-0 { margin-top: 0 !important; }
.mb-0 { margin-bottom: 0 !important; }
.flex { display: flex; }
.gap-10 { gap: 10px; }
.align-center { align-items: center; }

/* ==========================================================================
   SEO / GEO additions
   ========================================================================== */
.reviewed-by { margin: 14px 0 0; font-size: 0.9rem; color: rgba(255,255,255,0.72); max-width: 760px; }
.reviewed-by strong, .reviewed-by a { color: #fff; }
.last-updated { text-align: center; color: var(--ink-500); font-size: 0.85rem; margin: 0; padding: 18px 20px 30px; }
.screen-reader-text {
  border: 0; clip: rect(1px, 1px, 1px, 1px); clip-path: inset(50%);
  height: 1px; width: 1px; margin: -1px; overflow: hidden; padding: 0;
  position: absolute !important; word-wrap: normal !important;
}
.skip-link:focus {
  clip: auto !important; clip-path: none; height: auto; width: auto; margin: 0;
  position: fixed !important; top: 8px; left: 8px; z-index: 100000;
  background: var(--navy-900); color: #fff; padding: 10px 16px; border-radius: var(--radius-sm);
}

/* ==========================================================================
   7. Platform theme (home page): amber on indigo-navy
   ========================================================================== */

/* --- Marketplace accent: amber on indigo-navy, for the platform home page --- */
.is-marketplace-page .page-hero,
.is-marketplace-page .hero {
  background: radial-gradient(900px 420px at 92% -20%, rgba(245,165,36,0.30), transparent 60%), linear-gradient(160deg, #0a1030, #1b2a6b 72%, #26358a);
}
.is-marketplace-page .eyebrow { color: #8a5a00; background: rgba(245,165,36,0.16); }
.is-marketplace-page .page-hero .eyebrow,
.is-marketplace-page .hero .eyebrow,
.is-marketplace-page .bg-navy .eyebrow { color: #ffd28a; background: rgba(245,165,36,0.18); }
.is-marketplace-page .btn-primary { background: var(--amber-500); color: var(--navy-950); }
.is-marketplace-page .btn-primary:hover { background: var(--amber-600); color: #fff; }
.is-marketplace-page .check-list li::before,
.is-marketplace-page .bg-navy .check-list li::before { background-color: var(--amber-500); }
.is-marketplace-page .card:hover { border-color: var(--amber-500); }
.is-marketplace-page .card .icon { background: #fdf1d9; color: #8a5a00; }
.is-marketplace-page .step .num { background: #1b2a6b; }
.is-marketplace-page .bg-navy { background: #141f55; }
.is-marketplace-page .hero .hero-stat .num,
.is-marketplace-page .page-hero .hero-stat .num { color: #ffc861; }
.is-marketplace-page .btn-primary:hover { color: #fff; }

.bg-navy .eyebrow { color: var(--teal-400); background: rgba(20,184,166,0.18); }
.page-hero .hero-stats { margin-top: 36px; }
.page-hero .hero-actions { align-items: center; }
.card-featured { border-color: var(--amber-500); box-shadow: var(--shadow-md); }

/* --- Dark glass cards used inside navy sections --- */
.glass-card { background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.14); border-radius: var(--radius-md); padding: 26px 24px; }
.glass-card .step-no { display: block; font-family: var(--font-head); font-weight: 800; font-size: 1.7rem; color: var(--amber-500); margin-bottom: 8px; }
.glass-card h3 { font-size: 1.08rem; margin-bottom: 8px; }
.glass-card p { margin: 0; font-size: 0.93rem; }

/* --- Anonymised expert match card (illustration) --- */
.match-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 26px; max-width: 460px; margin-left: auto; }
@media (max-width: 860px) { .match-card { margin: 0 auto; } }
.match-badge { display: inline-block; font-size: 0.7rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-500); background: var(--surface-100); padding: 4px 10px; border-radius: 999px; }
.match-head { display: flex; align-items: center; gap: 14px; margin: 16px 0; }
.match-head strong { display: block; font-family: var(--font-head); color: var(--navy-900); line-height: 1.2; }
.match-head small { color: var(--ink-500); font-size: 0.82rem; }
.match-avatar { width: 48px; height: 48px; border-radius: 50%; background: var(--navy-100); color: var(--navy-900); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.match-avatar svg { width: 22px; height: 22px; }
.match-fit { margin-left: auto; font-weight: 700; font-size: 0.78rem; color: #8a5a00; background: #fdf1d9; padding: 5px 12px; border-radius: 999px; white-space: nowrap; }
.match-rows { list-style: none; margin: 16px 0 0; padding: 16px 0 0; border-top: 1px solid var(--border); display: grid; gap: 10px; }
.match-rows li { display: flex; justify-content: space-between; gap: 14px; font-size: 0.9rem; }
.match-rows li span { color: var(--ink-500); }
.match-rows li strong { color: var(--navy-900); text-align: right; }
.match-lock { display: flex; align-items: center; gap: 10px; margin-top: 18px; background: var(--surface-50); border-radius: var(--radius-sm); padding: 10px 12px; font-size: 0.8rem; color: var(--ink-500); }
.match-lock svg { width: 18px; height: 18px; flex-shrink: 0; }

/* ==========================================================================
   8. Forms (consultation, post a project, apply as an expert)
   ========================================================================== */
.form-layout { display: grid; grid-template-columns: 0.8fr 1.2fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .form-layout { grid-template-columns: 1fr; gap: 30px; } }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 32px; box-shadow: var(--shadow-md); color: var(--ink-700); }
@media (max-width: 540px) { .form-card { padding: 22px 18px; } }
.imdr-form .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 18px; }
@media (max-width: 540px) { .imdr-form .form-grid { grid-template-columns: 1fr; } }
.imdr-form .field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.imdr-form .field--full { grid-column: 1 / -1; }
.imdr-form label { font-weight: 600; font-size: 0.88rem; color: var(--navy-900); }
.imdr-form .req { color: #c0392b; }
.imdr-form input[type="text"],
.imdr-form input[type="email"],
.imdr-form input[type="url"],
.imdr-form select,
.imdr-form textarea {
  font: inherit; font-size: 0.95rem; color: var(--ink-900);
  width: 100%; padding: 11px 13px;
  background: #fff; border: 1.5px solid var(--ink-300); border-radius: var(--radius-sm);
}
.imdr-form textarea { resize: vertical; min-height: 120px; }
.imdr-form input:focus, .imdr-form select:focus, .imdr-form textarea:focus {
  outline: none; border-color: var(--teal-500); box-shadow: 0 0 0 3px rgba(20,184,166,0.2);
}
.is-marketplace-page .imdr-form input:focus,
.is-marketplace-page .imdr-form select:focus,
.is-marketplace-page .imdr-form textarea:focus { border-color: var(--amber-500); box-shadow: 0 0 0 3px rgba(245,165,36,0.25); }
.imdr-form .field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.imdr-form .field--check input { width: 18px; height: 18px; margin-top: 3px; flex-shrink: 0; }
.imdr-form .field--check label { font-weight: 400; font-size: 0.88rem; color: var(--ink-700); }
.imdr-form .form-actions { margin-top: 22px; }
.imdr-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-notice { padding: 14px 18px; border-radius: var(--radius-sm); margin-bottom: 20px; font-size: 0.95rem; }
.form-notice--ok { background: #e8f8f3; border: 1px solid #9edbc7; color: #0b5d4a; }
.form-notice--err { background: #fdecec; border: 1px solid #f3b4b4; color: #8a1f1f; }

/* ==========================================================================
   9. Navigation groups (dropdowns)
   ========================================================================== */
.primary-nav .menu-item-has-children > a::after {
  content: ""; display: inline-block; margin-left: 7px; vertical-align: middle;
  border: 4px solid transparent; border-top-color: currentColor; border-bottom: 0;
}
.primary-nav .sub-menu {
  display: none; position: absolute; top: 100%; left: 0; min-width: 270px; z-index: 1000;
  flex-direction: column; align-items: stretch; gap: 0;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md);
  box-shadow: var(--shadow-md); padding: 8px; list-style: none; margin: 0;
}
.primary-nav li:hover > .sub-menu,
.primary-nav li:focus-within > .sub-menu,
.primary-nav li.is-open > .sub-menu { display: flex; }
.primary-nav .sub-menu a { font-weight: 500; padding: 10px 14px; white-space: nowrap; }
@media (max-width: 1379px) {
  /* Mobile: groups start collapsed and open one at a time when tapped (main.js toggles .is-open).
     hover / focus-within are switched off here: on touch they stick and stop a group from closing. */
  .primary-nav .sub-menu,
  .primary-nav li:hover > .sub-menu,
  .primary-nav li:focus-within > .sub-menu { display: none; position: static; min-width: 0; box-shadow: none; border: 0; padding: 0 0 6px 14px; background: transparent; }
  .primary-nav li.is-open > .sub-menu { display: flex; }
  .primary-nav .menu-item-has-children > a { display: flex; align-items: center; justify-content: space-between; }
  .primary-nav .menu-item-has-children > a::after { margin-left: 12px; border-width: 5px; transition: transform 0.2s ease; }
  .primary-nav .menu-item-has-children.is-open > a::after { transform: rotate(180deg); }
  .primary-nav .sub-menu a { white-space: normal; }
}

/* ==========================================================================
   10. Fixes / polish
   ========================================================================== */
.bg-navy .check-list li { color: rgba(255,255,255,0.86); }
.page-hero .eyebrow { color: var(--teal-400); background: rgba(20,184,166,0.18); }
.is-marketplace-page .page-hero .eyebrow { color: #ffd28a; background: rgba(245,165,36,0.18); }
.primary-nav a, .header-cta .btn { white-space: nowrap; }
.header-inner { max-width: 1900px; gap: 18px; }
@media (max-width: 1379px) {
  .header-cta { display: none; }
}
@media (max-width: 640px) {
  .hero-stats { grid-template-columns: 1fr; gap: 14px; }
}
.hero-inner { max-width: var(--maxw); }
.hero-inner h1 { max-width: 820px; }

/* ==========================================================================
   9. Growth layer (v1.5): templates, expert recruiting, FAQ, sticky bar
   ========================================================================== */
.btn-sm { padding: 9px 16px; font-size: 0.85rem; }
.btn-outline-dark { background: #fff; color: var(--navy-900); border: 1.5px solid var(--ink-300); }
.btn-outline-dark:hover { border-color: var(--teal-500); color: var(--teal-600); transform: translateY(-1px); }

.header-link { font-family: var(--font-head); font-weight: 600; font-size: 0.92rem; color: var(--navy-900); white-space: nowrap; }
.header-link:hover { color: var(--teal-600); }
@media (max-width: 1100px) { .header-link { display: none; } }

.growth { padding: 72px 0; }
.growth .section-head { margin-bottom: 36px; }
.growth-expert { background: var(--surface-50); }

.tpl-grid { margin-bottom: 36px; }
.tpl-card {
  text-align: left; font: inherit; cursor: pointer;
  display: flex; flex-direction: column; gap: 8px;
  background: #fff; border: 1.5px solid var(--border); border-radius: var(--radius-md);
  padding: 20px 20px 18px; box-shadow: var(--shadow-sm);
  transition: border-color .15s, transform .15s, box-shadow .15s;
}
.tpl-card:hover, .tpl-card:focus-visible { border-color: var(--teal-500); transform: translateY(-2px); box-shadow: var(--shadow-md); outline: none; }
.tpl-card strong { font-family: var(--font-head); color: var(--navy-900); font-size: 1.02rem; }
.tpl-card span { color: var(--ink-500); font-size: 0.9rem; }
.tpl-card em { font-style: normal; font-weight: 600; font-size: 0.85rem; color: var(--teal-600); margin-top: auto; }

.growth-points .point { padding: 6px 4px; }
.growth-points .icon {
  width: 42px; height: 42px; border-radius: 12px; background: var(--navy-100); color: var(--navy-800);
  display: flex; align-items: center; justify-content: center; margin-bottom: 12px;
}
.growth-points .icon svg { width: 22px; height: 22px; }
.growth-points h4 { margin-bottom: 6px; font-size: 1rem; }
.growth-points p { color: var(--ink-500); font-size: 0.9rem; margin: 0; }

.spec-pick { margin-top: 44px; text-align: center; }
.spec-pick h3 { font-size: 1.1rem; margin-bottom: 4px; }
.spec-chips { justify-content: center; }
.spec-chip {
  font: inherit; font-weight: 600; font-size: 0.88rem; cursor: pointer;
  background: #fff; color: var(--navy-900); border: 1.5px solid var(--ink-300);
  padding: 9px 16px; border-radius: 999px; transition: all .15s;
}
.spec-chip:hover, .spec-chip:focus-visible { border-color: var(--teal-500); background: var(--teal-500); color: var(--navy-950); outline: none; }
.spec-note { margin: 14px 0 0; font-size: 0.85rem; color: var(--ink-500); }

.refer-card {
  margin-top: 44px; display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 26px 30px; box-shadow: var(--shadow-sm);
}
.refer-card h3 { margin-bottom: 4px; font-size: 1.15rem; }
.refer-card p { margin: 0; color: var(--ink-500); font-size: 0.93rem; max-width: 460px; }
.share-row { display: flex; gap: 10px; flex-wrap: wrap; }

.after-submit { margin-top: 14px; padding: 16px 18px; background: var(--surface-50); border: 1px solid var(--border); border-radius: var(--radius-md); }
.after-submit h4 { margin-bottom: 6px; font-size: 1rem; }
.after-submit p { margin: 0 0 12px; font-size: 0.9rem; color: var(--ink-500); }
.after-submit p:last-child { margin-bottom: 0; }


.sticky-cta {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
  background: var(--navy-950); padding: 12px 16px calc(12px + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 -8px 24px rgba(8,18,37,0.25);
  transform: translateY(0); transition: transform .25s ease;
}
.sticky-cta[hidden] { display: none; }
.sticky-cta.is-away { transform: translateY(110%); }
.sticky-cta__text { color: rgba(255,255,255,0.85); font-size: 0.9rem; font-weight: 500; }
@media (max-width: 640px) { .sticky-cta__text { display: none; } .sticky-cta .btn { flex: 1 1 0; text-align: center; justify-content: center; } }
@media (max-width: 860px) { .growth { padding: 52px 0; } }

/* Work board */
.growth-board { background: #fff; }
.board-card { background: var(--surface-50); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 6px; }
.board-card h3 { font-size: 1.05rem; margin: 2px 0 0; }
.board-area { align-self: flex-start; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--teal-600); }
.board-meta { margin: 0; color: var(--ink-500); font-size: 0.88rem; }
.board-ago { margin-top: auto; padding-top: 10px; color: var(--ink-500); font-size: 0.78rem; }
.board-cta { margin-top: 32px; text-align: center; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }


/* ==========================================================================
   v1.7 additions: extra pages (tables, glossary, legal text, card links)
   ========================================================================== */
.card h3 a { color: inherit; text-decoration: none; }
.card h3 a:hover { color: var(--teal-600); }
.card .card-more { margin: 14px 0 0; font-weight: 600; font-size: 0.92rem; }
.card .card-more a { color: var(--teal-600); text-decoration: none; }
.card .card-more a:hover { text-decoration: underline; }
.region-item h3 a, .region-item h4 a { color: inherit; text-decoration: none; }
.region-item h3 a:hover, .region-item h4 a:hover { color: var(--teal-600); }

.table-wrap { overflow-x: auto; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-0); }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.94rem; min-width: 640px; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 14px 18px; border-bottom: 1px solid var(--border); }
.data-table thead th { background: var(--navy-900); color: #fff; font-family: var(--font-head); font-size: 0.88rem; letter-spacing: 0.02em; }
.data-table tbody th { background: var(--navy-100); color: var(--navy-900); font-weight: 600; width: 20%; }
.data-table tbody tr:last-child th, .data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td { color: var(--ink-500); }
.table-note { color: var(--ink-500); font-size: 0.88rem; margin: 14px 0 0; }

.faq-group { margin: 38px 0 4px; font-family: var(--font-head); color: var(--navy-900); font-size: 1.25rem; }
.faq-group:first-child { margin-top: 0; }

.glossary-nav { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 28px; }
.glossary-nav a { display: inline-flex; width: 34px; height: 34px; align-items: center; justify-content: center; border: 1px solid var(--border); border-radius: 8px; font-weight: 600; color: var(--navy-900); text-decoration: none; background: var(--surface-0); }
.glossary-nav a:hover { background: var(--navy-900); color: #fff; }
.glossary-letter { margin: 34px 0 6px; font-size: 1.5rem; color: var(--teal-600); scroll-margin-top: 90px; }
.glossary dt { font-weight: 700; color: var(--navy-900); margin-top: 16px; }
.glossary dd { margin: 4px 0 0; color: var(--ink-500); }

.legal-body h2 { font-size: 1.3rem; margin: 34px 0 10px; }
.legal-body h2:first-child { margin-top: 0; }
.legal-body p, .legal-body li { color: var(--ink-500); }
.legal-body ul { padding-left: 1.2em; margin: 8px 0 14px; }
.legal-body li { margin: 4px 0; }
.legal-body a { color: var(--teal-600); }


/* ==========================================================================
   v1.8: accessibility, logo, mobile CTA, print
   ========================================================================== */
/* Visible keyboard focus everywhere (form fields keep their own ring). */
a:focus-visible, button:focus-visible, summary:focus-visible, [tabindex]:focus-visible,
.btn:focus-visible, .menu-toggle:focus-visible {
  outline: 3px solid var(--teal-500); outline-offset: 2px; border-radius: 6px;
}
.bg-navy a:focus-visible, .page-hero a:focus-visible, .hero a:focus-visible, .site-footer a:focus-visible, .sticky-cta a:focus-visible {
  outline-color: #ffd28a;
}
.form-notice:focus { outline: none; }
.form-notice:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

/* Respect reduced-motion settings. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
}

/* Brand logo tile. The artwork is a square gradient, so CSS supplies the corner
   radius (matches the site's 10px control radius, scaled up for the larger tile). */
.site-branding .brand-link { display: flex; align-items: center; gap: 12px; color: inherit; }
.brand-logo { display: block; flex: none; border-radius: 11px; background: var(--navy-900); }
.brand-logo--header { width: 46px; height: 46px; box-shadow: 0 1px 2px rgba(11, 37, 69, 0.18), 0 4px 12px rgba(0, 74, 173, 0.18); }
.brand-logo--footer { width: 52px; height: 52px; border-radius: 12px; box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.14); }
.brand-text { display: flex; flex-direction: column; gap: 3px; }
.brand-text .site-title { font-size: 1.15rem; }
.footer-brand .site-title { font-size: 1.25rem; }
.brand-link:focus-visible, .footer-brand:focus-visible { outline: 2px solid var(--teal-500); outline-offset: 4px; border-radius: 12px; }
@media (max-width: 540px) {
  .brand-text .site-tagline { display: none; }
  .brand-logo--header { width: 42px; height: 42px; border-radius: 10px; }
  .header-inner { padding-top: 14px; padding-bottom: 14px; } /* keeps header at 70px to match the mobile menu offset */
}
/* Logo uploaded in Appearance > Customize > Site Identity (kept for compatibility). */
.site-branding .custom-logo-link { display: flex; align-items: center; }
.site-branding .custom-logo { display: block; height: auto; max-height: 46px; width: auto; max-width: 220px; }

/* The header buttons are hidden on small screens, so the menu carries them. */
.nav-cta-mobile { display: none; }
@media (max-width: 1379px) {
  .primary-nav .nav-cta-mobile { display: flex; flex-direction: column; gap: 10px; padding: 18px 20px 0; }
  .primary-nav .nav-cta-mobile a.btn { border: 2px solid transparent; border-radius: 999px; padding: 13px 20px; justify-content: center; text-align: center; font-size: 1rem; }
  .primary-nav .nav-cta-mobile a.btn-amber { background: var(--amber-500); color: var(--navy-950); }
  .primary-nav .nav-cta-mobile a.btn-amber:hover { background: var(--amber-600); color: #fff; }
  .primary-nav .nav-cta-mobile a.btn-outline-dark { background: #fff; color: var(--navy-900); border-color: var(--ink-300); }
  .primary-nav .nav-cta-mobile a.btn-outline-dark:hover { background: #fff; color: var(--teal-600); border-color: var(--teal-500); }
}

@media print {
  .site-header, .sticky-cta, .site-footer .footer-grid, .skip-link, .imdr-form, .share-row { display: none !important; }
  body { background: #fff; color: #000; }
  a { color: inherit; text-decoration: underline; }
  a[href^="http"]:after { content: " (" attr(href) ")"; font-size: 0.8em; }
}

/* ==========================================================================
   Freemium (v2.2): tiers, plans, opportunities, account, Verified badge
   ========================================================================== */
.v-badge { display: inline-flex; align-items: center; gap: 4px; color: #0b6b4f; background: #e8f8f3; border: 1px solid #9edbc7; border-radius: 999px; padding: 2px 10px 2px 6px; font-size: 0.8rem; font-weight: 700; line-height: 1.4; vertical-align: middle; }
.v-badge svg { width: 18px; height: 18px; color: #0e8c86; }
.tier-tag { display: inline-block; font-size: 0.7rem; font-weight: 800; letter-spacing: 0.05em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }
.tier-tag--free { background: #e7edf6; color: var(--navy-800); }
.tier-tag--premium { background: #fff1d6; color: #8a5600; border: 1px solid #f5c77a; }
.tier-tag--filled { background: #eceff3; color: var(--ink-500); }
.opp-board .opp-you { margin: 0 0 16px; color: var(--ink-700); }
.opp-filters { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; margin-bottom: 24px; }
.opp-filters label { display: flex; flex-direction: column; gap: 4px; font-size: 0.82rem; font-weight: 600; }
.opp-filters select { padding: 9px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; background: #fff; }
.opp-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-md); padding: 20px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow-sm); }
.opp-card--premium { border-color: #f5c77a; background: linear-gradient(180deg, #fffaf0, #fff 60%); }
.opp-card.is-filled { opacity: 0.7; }
.opp-card h3 { font-size: 1.05rem; margin: 2px 0 0; }
.opp-card h3 a { color: var(--navy-900); text-decoration: none; }
.opp-card__top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.opp-card__foot { margin-top: auto; padding-top: 12px; display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.opp-card__cta { font-weight: 700; font-size: 0.88rem; display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.opp-card__cta svg { width: 14px; height: 14px; }
.opp-pages { display: flex; gap: 8px; justify-content: center; margin-top: 26px; }
.opp-pages a, .opp-pages .is-current { padding: 6px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); text-decoration: none; }
.opp-pages .is-current { background: var(--navy-900); color: #fff; }
.lock-box { text-align: center; background: var(--surface-50); border: 1px dashed var(--ink-300); border-radius: var(--radius-md); padding: 34px 24px; margin: 18px 0; }
.lock-box > svg { width: 34px; height: 34px; color: var(--amber-600); }
.lock-box__actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-top: 14px; }
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: stretch; }
.plan-card { background: #fff; border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 28px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow-sm); }
.plan-card--featured { border: 2px solid var(--amber-500); box-shadow: var(--shadow-md); }
.plan-name { font-size: 0.8rem; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase; color: var(--teal-600); }
.plan-price { font-family: var(--font-head); font-size: 1.6rem; font-weight: 800; color: var(--navy-900); }
.plan-sub { margin: 0; color: var(--ink-500); }
.plan-list { list-style: none; padding: 0; margin: 6px 0 14px; display: grid; gap: 8px; flex: 1; }
.plan-list li { padding-left: 24px; position: relative; }
.plan-list li::before { content: "\2713"; position: absolute; left: 0; color: var(--teal-600); font-weight: 800; }
.plan-state { margin: 0; font-weight: 600; color: var(--navy-800); }
.acct-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.acct-tags { display: flex; gap: 8px; align-items: center; }
.acct-grid { align-items: start; }
.acct-small { font-size: 0.85rem; color: var(--ink-500); }
.acct-steps { padding-left: 20px; display: grid; gap: 12px; }
.acct-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.acct-profile summary { cursor: pointer; }
.acct #loginform p { margin: 0 0 14px; display: flex; flex-direction: column; gap: 4px; }
.acct #loginform label { font-weight: 600; font-size: 0.9rem; }
.acct #loginform input[type="text"], .acct #loginform input[type="password"] { padding: 11px 12px; border: 1px solid var(--border); border-radius: var(--radius-sm); font: inherit; }
.acct #loginform .login-remember label { flex-direction: row; gap: 8px; font-weight: 400; }
.acct #loginform input[type="submit"] { background: var(--navy-900); color: #fff; border: 0; border-radius: 999px; padding: 12px 22px; font-weight: 700; cursor: pointer; }
@media (max-width: 900px) { .plan-grid { grid-template-columns: 1fr; } }

.plan-teaser { margin: 28px auto 0; max-width: 820px; text-align: center; background: var(--surface-50); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px 22px; }
.plan-teaser p { margin: 0; }

/* ==========================================================================
   Header layout hardening (v2.3.3)
   Fixes: tagline wrapping into a tall column, header CTAs pushed off-screen
   (page-wide horizontal scroll), and menus too long for the bar.
   The bar is one non-wrapping row: brand | nav (takes the spare room) | CTAs.
   As the viewport narrows, detail is shed in steps instead of overflowing:
   tagline -> nav padding/size -> text links -> hamburger menu.
   ========================================================================== */
html, body { overflow-x: clip; }              /* last-resort guard: never a sideways page scroll */
.header-inner { flex-wrap: nowrap; }
.site-branding { flex: 0 0 auto; min-width: 0; }
.brand-text { white-space: nowrap; }          /* tagline stays on one line, or is hidden - never wrapped */
.site-tagline { display: none; white-space: nowrap; }
.primary-nav { flex: 1 1 auto; min-width: 0; }
.header-cta { flex: 0 0 auto; }
.menu-toggle { margin-left: auto; flex: 0 0 auto; }

@media (min-width: 1380px) {
  .primary-nav ul { justify-content: center; flex-wrap: nowrap; }
  .primary-nav a { padding: 10px 7px; font-size: 0.86rem; }    /* tight: brand + 8 items + Log in + Post a Project */
  .header-cta { gap: 12px; }
  .header-cta .header-link--secondary { display: none; }        /* "Join as an Expert" is also on the home page and in the mobile menu */
}
@media (min-width: 1620px) {
  .primary-nav a { padding: 10px 10px; font-size: 0.9rem; }
  .header-cta .header-link--secondary { display: inline; }
}
@media (min-width: 1800px) {
  .primary-nav a { padding: 10px 12px; font-size: 0.92rem; }
  .header-cta { gap: 16px; }
}
@media (min-width: 1900px) {                                    /* only wide screens have room for the tagline */
  .site-tagline { display: block; }
}

/* Frosted-glass header. The blur lives on a pseudo-element, NOT on .site-header itself:
   backdrop-filter on the header makes it the containing block for the position:fixed
   mobile menu, which collapsed the open menu to ~50px tall and let it overlap the hamburger. */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  backdrop-filter: saturate(180%) blur(10px);
}

/* ==========================================================================
   Forms v2.4: Post a Project + Expert application (sectioned layout)
   The contact form and member forms keep the compact single-grid layout; these
   two get numbered sections, option chips, a progress meter and their own accent
   (amber = work posters, teal = experts, matching the header buttons).
   ========================================================================== */

/* ---- Shared polish for every .imdr-form: roomier, calmer inputs ---- */
.imdr-form label { letter-spacing: 0.005em; }
.imdr-form input[type="text"],
.imdr-form input[type="email"],
.imdr-form input[type="url"],
.imdr-form select,
.imdr-form textarea {
  min-height: 48px; padding: 12px 14px; border-radius: 10px;
  border: 1.5px solid #cfd6e2; background-color: var(--surface-50);
  transition: border-color .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.imdr-form input::placeholder, .imdr-form textarea::placeholder { color: #9aa3b2; }
.imdr-form input:hover, .imdr-form select:hover, .imdr-form textarea:hover { border-color: #aeb8c9; }
.imdr-form input:focus, .imdr-form select:focus, .imdr-form textarea:focus { background-color: #fff; }
.imdr-form select {
  appearance: none; -webkit-appearance: none; padding-right: 42px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 14px center; background-size: 16px;
}
.imdr-form textarea { min-height: 150px; line-height: 1.55; }

/* ---- Card ---- */
.form-card--sectioned {
  --accent: var(--teal-500); --accent-deep: var(--teal-600); --accent-soft: rgba(20,184,166,.10); --accent-ring: rgba(20,184,166,.28); --on-accent: var(--navy-950);
  padding: 0; overflow: clip; border-radius: 24px; border-color: #e1e7f0;
  box-shadow: 0 1px 2px rgba(11,37,69,.05), 0 24px 56px -12px rgba(11,37,69,.18);
  position: relative;
}
.form-card--sectioned.accent-amber {
  --accent: var(--amber-500); --accent-deep: #b86f00; --accent-soft: rgba(245,165,36,.14); --accent-ring: rgba(245,165,36,.32);
}
.form-card--sectioned::before { content: ""; display: block; height: 5px; background: var(--accent); }
.form-card--sectioned .form-notice { margin: 20px 32px 0; }

/* Header */
.form-head { display: flex; gap: 16px; align-items: center; padding: 28px 32px 8px; }
.form-head__icon { flex: none; width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-deep); }
.form-head__icon svg { width: 26px; height: 26px; }
.form-head__title { margin: 0 0 2px; font-size: 1.35rem; letter-spacing: -0.015em; }
.form-head__sub { margin: 0; color: var(--ink-500); font-size: .93rem; line-height: 1.45; }
.form-badges { list-style: none; margin: 14px 0 0; padding: 0 32px 18px; display: flex; flex-wrap: wrap; gap: 8px 10px; }
.form-badges li { display: inline-flex; align-items: center; gap: 7px; font-size: .8rem; font-weight: 600; color: var(--navy-800); background: var(--surface-100); border-radius: 999px; padding: 6px 12px 6px 9px; line-height: 1.2; }
.form-badges svg { width: 15px; height: 15px; color: var(--accent-deep); flex: none; }

/* Progress meter (sticks under the site header while scrolling the form) */
.form-progress { position: sticky; top: 71px; z-index: 6; display: flex; align-items: center; gap: 14px; padding: 12px 32px; background: rgba(255,255,255,.94); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.form-progress[hidden] { display: none; }
.form-progress__bar { flex: 1; height: 8px; background: var(--surface-100); border-radius: 99px; overflow: hidden; }
.form-progress__bar span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 99px; transition: width .35s cubic-bezier(.3,.7,.2,1); }
.form-progress__text { font-size: .8rem; font-weight: 700; color: var(--navy-800); white-space: nowrap; font-variant-numeric: tabular-nums; }

/* Form body + sections */
.imdr-form--sectioned { padding: 8px 32px 4px; }
.form-section { padding: 26px 0 28px; border-bottom: 1px solid var(--border); }
.form-section:last-of-type { border-bottom: 0; }
.form-section__head { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 18px; }
.form-section__num { flex: none; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font: 800 .86rem var(--font-head); color: var(--navy-900); background: var(--accent-soft); box-shadow: inset 0 0 0 1.5px var(--accent); transition: background .2s, color .2s, box-shadow .2s; }
.form-section.is-complete .form-section__num { background: var(--accent); color: var(--on-accent); font-size: 0; box-shadow: none; }
.form-section.is-complete .form-section__num::after { content: ""; width: 12px; height: 7px; border-left: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(-45deg) translate(1px,-1px); }
.form-section__title { margin: 3px 0 2px; font-size: 1.08rem; letter-spacing: -0.01em; }
.form-section__hint { margin: 0; font-size: .88rem; color: var(--ink-500); line-height: 1.45; }
.imdr-form--sectioned .form-grid { gap: 20px 18px; }
.imdr-form--sectioned .field > label, .imdr-form--sectioned .field--choice > legend { font-size: .88rem; }
.imdr-form--sectioned input:focus, .imdr-form--sectioned select:focus, .imdr-form--sectioned textarea:focus,
.is-marketplace-page .imdr-form--sectioned input:focus, .is-marketplace-page .imdr-form--sectioned select:focus, .is-marketplace-page .imdr-form--sectioned textarea:focus {
  border-color: var(--accent-deep); box-shadow: 0 0 0 4px var(--accent-ring);
}
.imdr-form .opt { margin-left: 6px; font-size: .72rem; font-weight: 600; color: var(--ink-500); background: var(--surface-100); padding: 2px 8px; border-radius: 99px; vertical-align: 1px; }
.field-count { align-self: flex-end; font-size: .76rem; color: var(--ink-500); font-variant-numeric: tabular-nums; margin-top: -2px; }

/* Option chips (radio groups) */
.imdr-form .field--choice { border: 0; margin: 0; padding: 0; min-inline-size: 0; display: flex; flex-direction: column; gap: 8px; }
.imdr-form .field--choice > legend { padding: 0; margin-bottom: 8px; font-weight: 600; color: var(--navy-900); float: none; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; display: inline-flex; margin: 0; cursor: pointer; font-weight: 500 !important; }
.chip input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; margin: 0; cursor: pointer; }
.chip span { display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; min-height: 44px; border-radius: 999px; border: 1.5px solid #cfd6e2; background: #fff; color: var(--ink-700); font-size: .9rem; line-height: 1.25; transition: border-color .15s, background-color .15s, color .15s, box-shadow .15s, transform .1s; }
.chip:hover span { border-color: var(--accent-deep); background: var(--accent-soft); }
.chip input:focus-visible + span { box-shadow: 0 0 0 4px var(--accent-ring); border-color: var(--accent-deep); }
.chip input:checked + span { background: var(--navy-900); border-color: var(--navy-900); color: #fff; font-weight: 600; }
.chip input:checked + span::before { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg) translateY(-1px); flex: none; }
.chip:active span { transform: scale(.98); }

/* Consent cards */
.imdr-form--sectioned .field--check { align-items: flex-start; gap: 14px; padding: 16px 18px; background: var(--surface-50); border: 1.5px solid #dfe5ee; border-radius: 14px; transition: border-color .15s, background-color .15s; cursor: pointer; }
.imdr-form--sectioned .field--check:hover { border-color: #b9c3d4; }
.imdr-form--sectioned .field--check:has(input:checked) { background: var(--accent-soft); border-color: var(--accent); }
.imdr-form--sectioned .field--check input { appearance: none; -webkit-appearance: none; flex: none; width: 22px; height: 22px; margin: 1px 0 0; border: 2px solid #aab4c5; border-radius: 7px; background: #fff; display: grid; place-items: center; cursor: pointer; transition: all .15s; }
.imdr-form--sectioned .field--check input:checked { background: var(--navy-900); border-color: var(--navy-900); }
.imdr-form--sectioned .field--check input:checked::after { content: ""; width: 10px; height: 6px; border-left: 2.5px solid #fff; border-bottom: 2.5px solid #fff; transform: rotate(-45deg) translate(1px,-1px); }
.imdr-form--sectioned .field--check input:focus-visible { outline: none; box-shadow: 0 0 0 4px var(--accent-ring); }
.imdr-form--sectioned .field--check label { font-size: .88rem; line-height: 1.55; color: var(--ink-700); cursor: pointer; }

/* Validation: friendly, only after the person has tried to submit */
.imdr-form--sectioned .field.is-invalid input, .imdr-form--sectioned .field.is-invalid select, .imdr-form--sectioned .field.is-invalid textarea { border-color: #d64545; background: #fff7f7; box-shadow: 0 0 0 4px rgba(214,69,69,.12); }
.imdr-form--sectioned .field--check.is-invalid { border-color: #d64545; background: #fff7f7; }
.imdr-form--sectioned .field--choice.is-invalid .chip span { border-color: #e7a3a3; }
.field-error { font-size: .8rem; font-weight: 600; color: #b42318; margin-top: 2px; }

/* Submit */
.form-actions--sectioned { margin: 4px -32px 0; padding: 22px 32px 26px; background: var(--surface-50); border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 14px; align-items: stretch; }
.btn-lg { padding: 17px 30px; font-size: 1.04rem; justify-content: center; }
.form-actions--sectioned .btn { width: 100%; box-shadow: 0 6px 18px -6px rgba(11,37,69,.35); }
.form-actions--sectioned .btn-arrow { transition: transform .2s ease; }
.form-actions--sectioned .btn:hover .btn-arrow { transform: translateX(4px); }
.form-actions--sectioned .btn:disabled { opacity: .75; cursor: progress; transform: none; }
.form-assurance { display: flex; gap: 8px; align-items: center; justify-content: center; margin: 0; font-size: .82rem; color: var(--ink-500); text-align: center; line-height: 1.4; }
.form-assurance svg { width: 15px; height: 15px; flex: none; }

/* What happens next */
.form-next { padding: 26px 32px 32px; border-top: 1px solid var(--border); }
.form-next h4 { margin: 0 0 14px; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--ink-500); }
.form-next ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; counter-reset: next; }
.form-next li { counter-increment: next; position: relative; padding-left: 42px; font-size: .92rem; line-height: 1.5; color: var(--ink-700); }
.form-next li::before { content: counter(next); position: absolute; left: 0; top: -2px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font: 800 .8rem var(--font-head); background: var(--surface-100); color: var(--navy-800); }
.form-next li:not(:last-child)::after { content: ""; position: absolute; left: 13px; top: 28px; bottom: -14px; width: 2px; background: var(--border); }

/* Side column: stay in view next to the long form on desktop */
@media (min-width: 861px) {
  .form-layout { grid-template-columns: 0.72fr 1.28fr; gap: 56px; }
  .form-layout > div:first-child { position: sticky; top: 104px; }
}

@media (max-width: 640px) {
  .form-head { padding: 22px 20px 6px; gap: 12px; }
  .form-head__icon { width: 44px; height: 44px; }
  .form-badges { padding: 0 20px 16px; }
  .form-progress { padding: 10px 20px; }
  .imdr-form--sectioned { padding: 4px 20px 2px; }
  .form-actions--sectioned { margin-left: -20px; margin-right: -20px; padding: 20px; }
  .form-next { padding: 22px 20px 26px; }
  .form-card--sectioned .form-notice { margin: 16px 20px 0; }
  .imdr-form--sectioned .form-grid { grid-template-columns: 1fr; }
  .chip span { padding: 10px 14px; }
}
@media (prefers-reduced-motion: reduce) {
  .form-progress__bar span, .chip span, .btn-arrow, .form-section__num { transition: none !important; }
}

/* ==========================================================================
   Mobile / laptop menu v2.10.4  (below 1380px, where the full menu cannot fit in one row)
   - The panel hangs from the header (position:absolute inside the sticky header), so it
     follows the real header height and the WordPress admin bar. It no longer fills the screen.
   - 601-1379px: a compact card at the right edge; Log in + Post a Project stay in the header bar.
   - 600px and below: full-width under the header; the buttons live inside the menu.
   ========================================================================== */
.admin-bar .site-header { top: 32px; }
.admin-bar .form-progress { top: 103px; }
@media (max-width: 782px) { .admin-bar .site-header { top: 46px; } .admin-bar .form-progress { top: 117px; } }
@media (max-width: 600px) { .admin-bar .site-header { top: 0; } .admin-bar .form-progress { top: 71px; } }

@media (max-width: 1379px) {
  .primary-nav {
    position: absolute; top: 100%; left: 0; right: 0; bottom: auto;
    max-height: calc(100vh - 140px); max-height: calc(100dvh - 140px);
    padding: 8px 0 14px;
    border-top: 1px solid var(--border);
    box-shadow: 0 18px 30px -12px rgba(11, 37, 69, 0.22);
    transform: translateY(-8px); opacity: 0; visibility: hidden;
    transition: opacity .18s ease, transform .18s ease, visibility 0s linear .18s;
  }
  .primary-nav.is-open { transform: none; opacity: 1; visibility: visible; transition: opacity .18s ease, transform .18s ease, visibility 0s; }
  .primary-nav ul { padding: 0 12px; gap: 0; }
  .primary-nav a { padding: 11px 12px; font-size: 0.96rem; }
  .primary-nav .sub-menu a { padding: 9px 12px; font-size: 0.92rem; }
  .primary-nav .nav-cta-mobile { padding: 12px 16px 0; }
  .primary-nav .nav-cta-mobile a.btn { padding: 11px 18px; font-size: 0.95rem; }
}

/* Tablet and laptop widths: keep the header useful instead of empty. */
@media (min-width: 601px) and (max-width: 1379px) {
  .header-cta { display: flex; order: 2; margin-left: auto; gap: 14px; }
  .header-cta .btn-dark-label { display: inline; }
  .header-cta .header-link { display: inline; }
  .header-cta .header-link--secondary { display: none; }
  .menu-toggle { order: 3; margin-left: 0; }
  .primary-nav {
    left: auto; right: 16px; width: min(380px, calc(100vw - 32px));
    border: 1px solid var(--border); border-radius: 14px;
    top: calc(100% + 6px);
  }
  /* Log in and Post a Project are already in the bar; keep only "Join as an Expert" in the card. */
  .primary-nav .nav-cta-mobile a:nth-child(-n+2) { display: none; }
}
@media (min-width: 601px) and (max-width: 1100px) { .header-cta .header-link { display: none; } }
