/* =====================================================================
   Company profile. One stylesheet serves the locked and unlocked views —
   the template branches on user.isMember (UI_HANDOFF.md §4), there is no
   second page. Shared header/footer/pill/ad live in mesteel.css.
   Values lifted verbatim from design/company_profile_unlocked.html.
   ===================================================================== */

/* ---------- Hero ---------- */
/* Brushed steel rather than the warehouse photograph the editorial
   pages share. The 70%/60% crop existed to find the stock in the lower
   half of that picture; a texture has no subject to hunt for, so it is
   centred. */
.hero{position:relative;height:280px;
  background:url(../img/hero_brushed.webp) center center/cover}
.hero:before{content:"";position:absolute;inset:0;z-index:0;background:linear-gradient(90deg,rgba(255,255,255,.95) 0%,rgba(255,255,255,.75) 50%,rgba(255,255,255,.25) 100%)}
.hero>*{position:relative;z-index:1}
.hero .head{position:absolute;left:0;right:0;bottom:-48px;display:flex;gap:22px;align-items:flex-end}
.hero h1{font-size:44px;line-height:1;letter-spacing:-.03em;margin-top:8px}
.kick{font-size:12px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--blue)}
.head .t,.head .a{padding-bottom:58px}
.head .t{flex:1;min-width:0}
.head .a{display:flex;gap:8px}

/* Top-aligned with the title block. The row is flex-end so the Call and
   Email buttons sit on the same baseline as the company name, but that
   dropped the logo 15px below the activity-and-country line above it.
   Only the logo opts out. */
.logo{align-self:flex-start;width:112px;height:112px;border-radius:26px;background:var(--blue);color:#fff;font-weight:800;display:grid;place-items:center;font-size:36px;box-shadow:0 16px 40px rgba(31,63,143,.3);border:4px solid #fff;flex:none}
.logo.img{background:#fff}
.logo img{width:100%;height:100%;object-fit:contain;padding:10px;border-radius:22px}

.meta{padding-top:60px;display:flex;gap:10px;align-items:center;font-size:14px;color:#475569;flex-wrap:wrap}
.meta i{color:#CBD5E1;font-style:normal}
.meta .flag{width:18px;height:13px;border-radius:2px;box-shadow:0 0 0 1px rgba(15,31,74,.12)}
/* Profile pills are a touch smaller than the shared component. */
.meta .pill,.head .pill{font-size:10.5px;padding:4px 9px;margin-left:0}
.pill.ok{color:var(--green);background:var(--green-10)}
.pill.grey{color:var(--mute);background:#F1F5F9}

.tabs{padding-top:20px;display:flex;gap:6px;font-size:13.5px;font-weight:700}
.tabs button{border:0;font:inherit;padding:9px 16px;border-radius:999px;background:var(--bg);color:#475569;cursor:pointer}
.tabs button.on{background:var(--blue);color:#fff}
.tabs button:hover{transform:none;background:var(--blue-10);color:var(--blue)}
.tabs button.on:hover{background:var(--blue);color:#fff}

/* ---------- Layout ---------- */
/* minmax(0,1fr), not 1fr: a grid track defaults to min-width:auto, so any
   non-wrapping content inside (a long media title with text-overflow:
   ellipsis) forces the whole column wider than the viewport. */
.layout{display:grid;grid-template-columns:minmax(0,1fr) 380px;gap:24px;padding:24px 0 48px;align-items:start}
.main{display:flex;flex-direction:column;gap:14px;min-width:0}
.two{display:grid;grid-template-columns:1fr 1fr;gap:14px}
aside{display:flex;flex-direction:column;gap:14px}

.box{border:1px solid var(--line);border-radius:22px;padding:24px;box-shadow:var(--shadow);background:#fff}
.box h2{font-size:20px}
.box .h{display:flex;justify-content:space-between;align-items:baseline}
.box .h small{font-size:13px;color:var(--mute)}
.box .h a{font-size:13px;font-weight:700}
.about{background:var(--bg);border:0;padding:26px}
.about p{margin:0;font-size:17px;line-height:1.6;color:#1E293B;text-wrap:pretty}

.chips{display:flex;flex-wrap:wrap;gap:6px;margin-top:14px;font-size:13px;font-weight:700}
.chips span{padding:7px 12px;border-radius:999px}
.chips.sell span{background:var(--green-10);color:#065F46}
.chips.buy span{background:var(--blue-10);color:var(--blue)}
.chips .more{background:none!important;color:var(--blue)!important;padding:7px 4px;cursor:pointer;border:0;font:inherit;font-weight:700}
/* design/README.md assigns blue-10 to Activities, but the profile reference
   already uses blue-10 for Buys. A third, distinct tone keeps the three
   chip sets tellable apart at a glance. */
.chips.act span{background:#E2E8F0;color:var(--navy)}
.chips.brands span,.chips.grey span{background:#fff;color:var(--ink);border:1px solid var(--line)}
.chips.grey span{color:#475569}

.facts{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-top:18px}
.facts div{background:#fff;border-radius:14px;padding:12px 14px}
.facts small{display:block;font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--mute)}
.facts b{display:block;font-size:15px;margin-top:4px}
.kv{display:flex;gap:14px;align-items:flex-start;margin-top:14px;font-size:13.5px}
.kv>span{flex:0 0 150px;color:var(--mute);font-weight:700;padding-top:7px}
.kv .chips{margin-top:0}
.kv .val{padding-top:7px}
/* Legacy free text that could not be parsed into a list keeps its own
   line breaks rather than running together. */
.kv .val.pre{white-space:pre-line}

.list{display:flex;flex-direction:column;gap:8px;margin-top:14px}
.row{display:grid;grid-template-columns:60px 1fr auto;gap:14px;align-items:center;background:var(--bg);border-radius:14px;padding:12px 14px;font-size:14px}
.row .tag{font-size:11px;font-weight:800;padding:4px 0;border-radius:999px;text-align:center}
.row .m{color:var(--mute)}
.row time{color:var(--faint);font-size:12.5px}
.job{background:var(--bg);border-radius:14px;padding:12px 14px;font-size:14px}
.job small{display:block;font-size:12.5px;color:var(--mute);margin-top:3px}
.cert{display:flex;justify-content:space-between;padding:10px 0;border-top:1px solid #F1F5F9;font-size:14px}
.cert span:last-child{color:var(--mute)}
.cert .ok{color:var(--green);font-weight:700}
.empty-line{margin-top:12px;font-size:13.5px;color:var(--mute)}

/* ---------- Media gallery ---------- */
.mtabs{display:flex;gap:6px;margin:12px 0 14px;flex-wrap:wrap}
.mtabs button{border:0;font:inherit;font-size:12.5px;font-weight:700;padding:0 14px;min-height:36px;border-radius:999px;background:var(--bg);color:#475569;cursor:pointer}
.mtabs button.on{background:var(--blue);color:#fff}
.mtabs button:hover{transform:none}
.mgrid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.mitem{display:flex;flex-direction:column;gap:8px;color:inherit;border:1px solid var(--line);border-radius:14px;padding:8px;background:#fff;min-width:0}
.mitem .mi{min-width:0}
.mitem:hover{border-color:#B7C4E4}
.mitem .thumb{aspect-ratio:4/3;border-radius:10px;background:linear-gradient(135deg,#DDE5F4,#EEF2F9);display:grid;place-items:center;overflow:hidden}
.mitem .thumb img{width:100%;height:100%;object-fit:cover}
.mitem .thumb .ph{font-size:12px;font-weight:800;letter-spacing:.08em;color:var(--mute)}
.mitem.document .thumb{background:#FFF7ED}
.mitem.document .thumb .ph{color:#C2410C;font-size:14px}
.mitem.video .thumb{background:var(--navy)}
.mitem.video .thumb .ph{color:#fff;font-size:22px;width:44px;height:44px;border-radius:50%;background:rgba(255,255,255,.15);display:grid;place-items:center}
.mitem .mi{padding:0 4px 4px}
.mitem b{display:block;font-size:13px;line-height:1.3;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mitem small{display:block;font-size:11.5px;color:var(--mute);margin-top:2px}

/* ---------- Contact card + paywall ---------- */
.contact{padding:0;overflow:hidden;box-shadow:0 12px 40px rgba(15,31,74,.08)}
.contact .h{padding:20px 22px 12px}
.clist{padding:0 22px 8px;display:flex;flex-direction:column;gap:12px;font-size:14px;color:#1E293B}
.clist div{display:flex;gap:10px}
.clist i{width:20px;color:var(--faint);font-style:normal;flex:none}
.clist a{color:var(--blue);font-weight:600;word-break:break-word}
/* Blurred placeholder for non-members. The values behind it are dummies —
   the API never sends real contact data to a non-member. */
.clist.locked{filter:blur(4.5px);user-select:none;pointer-events:none}
.paywall{margin:10px 12px 12px;background:linear-gradient(135deg,var(--blue),var(--navy));color:#fff;border-radius:16px;padding:18px;text-align:center}
.paywall p{margin:0;font-size:14px;line-height:1.5;color:#DCE3F5}
.paywall .btn{width:100%;margin-top:12px;background:#fff;color:var(--blue);font-weight:800}
.paywall .btn:hover{background:var(--blue-10);color:var(--blue)}
.paywall small{display:block;margin-top:8px;font-size:12px;color:#93A9E8}
.paywall small b{color:#fff}
.actions{display:flex;gap:8px;padding:14px 22px 18px;border-bottom:1px solid #F1F5F9}
.actions .btn{flex:1;font-size:13px;padding:10px}

.people,.depts{padding:16px 22px 6px}
.depts{padding-bottom:18px;border-top:1px solid #F1F5F9}
.ph{font-size:11px;font-weight:700;letter-spacing:.08em;text-transform:uppercase;color:var(--mute);margin-bottom:10px;display:flex;justify-content:space-between}
.ph small{font-weight:800;color:var(--blue)}
.person{display:flex;gap:12px;align-items:center;padding:10px 0;border-top:1px solid #F1F5F9}
.person:first-of-type{border-top:0}
.person .av{width:40px;height:40px;border-radius:12px;background:var(--blue);color:#fff;font-weight:800;font-size:12px;display:grid;place-items:center;flex:none}
.person .pi{flex:1;min-width:0;font-size:14px}
.person .pi b{font-size:14px}
.person .pi small{display:block;font-size:12.5px;color:var(--mute);margin-top:1px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.person .pa{display:flex;gap:4px}
.person .pa a{width:36px;height:36px;border-radius:10px;background:var(--bg);display:grid;place-items:center;color:var(--blue);font-size:15px}
.person .pa a:hover{background:var(--blue-10)}
.dept{display:grid;grid-template-columns:90px 1fr auto;gap:10px;font-size:13px;padding:8px 0;border-top:1px solid #F1F5F9}
.dept:first-of-type{border-top:0}
.dept b{font-size:13px}
.dept span{color:var(--mute)}

/* ---------- Map + similar ---------- */
.map{padding:0;overflow:hidden}
.map .canvas{height:170px;background:linear-gradient(135deg,#DDE5F4,#EEF2F9);position:relative;display:grid;place-items:center;color:var(--mute);font-size:12.5px;font-weight:700}
.map .pin{position:absolute;width:16px;height:16px;border-radius:50%;background:var(--blue);border:3px solid #fff;box-shadow:0 2px 8px rgba(0,0,0,.25);top:74px;left:190px}
.map .addr{padding:12px 18px;font-size:13px;color:var(--mute)}
/* Sidebar box ad (PROF_SQ, 300x250). Centred in the 380px column and
   allowed to shrink below 300px on narrow screens, where the sidebar
   drops under the main content. */
/* Full width of the rail, so its edges line up with the cards above it
   — it was a 300px box floating centred against a wider Similar
   companies card. min-height reserves the space before a banner has
   loaded, so the column does not jump when one arrives. */
.ad-box{width:100%;min-height:274px;padding:12px;margin:0}
/* The creative fills the box, edge to edge. height:auto keeps its
   proportions, so it scales up to the column rather than being squashed
   into it. The padding and min-height above apply to the empty dashed
   placeholder only: mesteel.css zeroes both once a banner loads, which
   is what lets it reach the edges. */
.ad-box .ad-link{display:block;width:100%}
/* 22px, the same corner as .box above it, so the rail reads as one
   column of cards rather than a stack with an odd one out. */
.ad-box,
.ad-box .ad-link,
.ad-box .ad-link img{border-radius:22px}
.ad-box .ad-link img{display:block;width:100%;height:auto}

.sim{padding:20px 22px}
.sim h2{font-size:17px;margin-bottom:12px}
.sim a{display:flex;gap:10px;align-items:center;font-size:14px;color:inherit}
.sim a+a{margin-top:12px}
.sim .av{width:36px;height:36px;border-radius:10px;background:var(--blue);color:#fff;font-weight:800;display:grid;place-items:center;font-size:12px;flex:none}
.sim .av.brief{background:var(--line);color:var(--mute)}
/* With a logo the tile is a white frame, as everywhere else. */
.sim .av{overflow:hidden}
.sim .av.img{background:#fff;box-shadow:inset 0 0 0 1px var(--line)}
.sim .av img{width:100%;height:100%;object-fit:contain;padding:3px}
.sim small{display:block;font-size:12px;color:var(--mute)}

/* ---------- Responsive ---------- */
@media (max-width:1023px){
  .hero{height:auto;padding-bottom:28px}
  /* The header is drawn over this hero and is 76px tall, so 28px of
     padding put the logo and the company name underneath it. */
  .hero .head{position:relative;bottom:auto;z-index:1;padding-top:96px;
    flex-wrap:wrap;align-items:center}
  .head .t,.head .a{padding-bottom:0}
  .head .a{width:100%}
  .logo{align-self:center;width:80px;height:80px;font-size:28px;border-radius:20px}
  .meta{padding-top:24px}
  .layout{grid-template-columns:1fr}
  .tabs{overflow-x:auto;flex-wrap:nowrap;scrollbar-width:none}
  .tabs::-webkit-scrollbar{display:none}
  .tabs button{white-space:nowrap;min-height:44px}
  .mgrid{grid-template-columns:repeat(3,1fr)}
}
@media (max-width:639px){
  .hero h1{font-size:30px}
  .hero:before{background:rgba(255,255,255,.94)}
  .two{grid-template-columns:1fr}
  .head .a .btn{flex:1;min-height:48px}
  .box{padding:18px;border-radius:18px}
  .about p{font-size:16px}
  .row{grid-template-columns:1fr;gap:6px}
  .row .tag{width:60px}
  .actions{flex-wrap:wrap}
  .actions .btn{min-height:44px}
  .facts{grid-template-columns:1fr 1fr}
  .kv{flex-direction:column;gap:6px}
  /* flex:0 0 150px sets the basis on the main axis, which is now the
     vertical one — so every label became a 150px-tall empty box with
     its value stranded underneath. */
  .kv>span{flex:none;padding:0}
  .dept{grid-template-columns:1fr;gap:2px}
  .mgrid{grid-template-columns:1fr 1fr}
}
